FILE_COPY

FILE_COPY F1,F2

COPIES THE EXISTING FILE F1 TO THE NEW FILE F2

  • Type: Command
  • Parameters: 2
  • Group: Files

ACTION

The command FILE_COPY F1,F2 copies the existing file F1 to the new file F2. An error is generated if the file F2 already exists.

F1 and F2 are absolute or relative names of file.

The absolute name is the entire name, related to the root of the file system (ex: "c:\temp\file.txt").

The relative name is the name of the file related to the current directory (ex: "file.txt" or "/file.txt" or "\file.txt").

SYNTAX: FILE_COPY F1,F2

  • F1 and F2 = absolute or relative names of the file.

USE

  • The command FILE_COPY is used to copy a file.

ERROR

  • If file F1 does not exist.
  • If file F2 already exists.
  • If F1 or F2 is not a correct name of file.

EXAMPLE

rem copy the file "test.txt" to "test2.txt"

file_copy "test.txt","test2.txt"

SEE ALSO

FILE_MOVE