CopyFile |
Top Previous Next |
The CopyFile command allows you to copy a specified file to another location.
Command Syntax
CopyFile:[SourceFileName],[TargetFileName]
The colon after the command and the comma between parameters are compulsory. Any additional spaces or characters will cause an error to be thrown. The command itself is not case sensitive, but parameters may be depending on the operating system and locale.
Parameters:
SourceFileName: The fully qualified path and file name identifying the file to copy TargetFileName: The fully qualified path and file name to which the file should be copied
All parameters are compulsory. If any parameter is missing or invalid an error will be thrown. The parameters must be surrounded by quotation marks if one or more spaces are included in the path and file name. It is good practice to include the quotation marks in any case, so that it reduces the risk of error when writing scripts.
Example:
CopyFile:"C:\Test Text.txt","C:\Test Text (copy).txt"
See Also: Conditional DeleteFile MoveFile RenameFile |