Copy File
Use this command to duplicate an existing file. This command works with absolute and relative paths.
The allowed paths for the Copy File command are specified by the PERMITTED_FILEMAINTENANCE_PATH parameter in the lv_af.cfg file, located in the working directory of the lv_af.exe. Files that cannot be copied are defined by the EXCLUDED_FILEMAINTENANCE_FILES parameter in the same file. These parameters only apply when they are set.
Syntax:
COPY FILE FROM "SourceFile" TO "[Destination]/[FileName]" [Overwrite]
where:
- SourceFile is the name of the file to be copied. The source file can be specified by it’s full path or by the name as long as it is located in the working directory.
- Destination is optional and is used to specify the location where the file should be copied to. If it’s not specified the SourceFile location will be used, unless the SourceFile location is not specified then it will be copied to the current working directory. If Destination is not specified, the FileName must be.
- FileName is optional and is used to name the copied file. If the FileName is not used, the file will be copied with the same name. If FileName is not specified, then the Destination must be.
- Overwrite is optional and specifies whether to overwrite a file that already exists with the same name.
Syntax example:
COPY FILE FROM "logs\export\export.log" TO "copy_export.log" OVERWRITE
See also