Moves a file from one directory to another one, on the PC.
Syntax
CHGVAR |
VAR(&CMD) VALUE('MOVEFILE') |
CHGVAR |
VAR(&PARM1) VALUE(' File="File to move" ;NewFile="Moved file" [;Replace=true/false] ') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 &PARM2 &RESULT) |
Parameters
Parameters |
|
Parm1 |
File : Complete path and name of the file to move. NewFile : Complete path and name of the moved file.
|
RESULT |
Contains eventually error message.
|
|
|
Note
If the destination file already exists and Replace=false, then an error will be returned. Example in the trace:
6540
2019-4-17 10:13:4.808 ERROR: the destination file already exists, and
Replace=false
6540 2019-4-17 10:13:4.811 *REJ
Example
LNCCMD CMD(MOVEFILE) PARM1('File="C:\temp\SBOOK.csv"; + NewFile="C:\temp\TEST\SBOOK.csv";replace=true')