COPY MEMO Command

Example   See Also

Copies the contents of the specified memo field in the current record to a text file.

Syntax

COPY MEMO MemoFieldName TO FileName
  [ADDITIVE]
  [AS nCodePage]

Arguments

MemoFieldName

Specifies the name of the memo field copied to the text file.

TO FileName

Specifies the name of a new or existing text file to which the memo field is copied. If you do not provide an extension in FileName, a .txt extension is assigned. You can also include a path with the file name.

ADDITIVE

Appends the contents of the memo field to the end of the specified text file. If you omit ADDITIVE, the memo field contents replace the contents of the text file.

AS nCodePage

Specifies the code page for the text file COPY MEMO creates. Visual FoxPro copies the contents of the specified memo field, and, as it copies the data, automatically converts the data to the code page you specify for the text file.

If you specify a value for nCodePage that is not supported, Visual FoxPro generates an error message. You can use GETCP( ) for nCodePage to display the Code Page dialog box, allowing you to specify a code page for the file Visual FoxPro creates.

If AS nCodePage is omitted or is 0, no code page conversion occurs.