# filecopy

Copies a file.

    filecopy <file1> <file2>

## Remarks

Copies file <file1> to file <file2>.
If <file2> already exists, it is overwritten. <file1> and <file2> must not be same.
If the file is copy successfully, the system variable "result" is set to 0. Otherwise, "result" is set to non-zero. (version 4.104 or later)

## Value of the system variable "result"

As a result of this command, the system variable "result" is set to one of the following values depending on the copy status:

Value | Status
--- | ---
-4 | Copy failed.
-3 | A file <file1> and file <file2> is same of name.
-2 | Be used invalid characters to file <file2>.
-1 | Be used invalid characters to file <file1>.
0 | Copy succeeded.

## Example

    filecopy 'test.dat' 'test2.dat'