Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Collapse the table of content
Expand the table of content


Duplicates any type of file.

COPY FILE FileName1 TO FileName2

COPY FILE creates a duplicate of the file whose name is specified in FileName1. You can use COPY FILE to copy any type of file. The file to be copied cannot be open. You must include the extensions for both the source file name FileName1 and destination file name FileName2.

FileName1 and FileName2 can contain wildcard characters such as * and ?. For example, to create backup copies of all program files with the extension .prg in the current directory, issue COPY FILE *.PRG TO *.BAK.

If you use COPY FILE to create a backup of a table that has a memo field, a structural index or both, be sure to copy the .fpt and .cdx files as well.

Community Additions

© 2015 Microsoft