PreviousNext
Help > Programming with LAUNCHER Office > LNCCMD commands > Commands list > COPYFILE command
COPYFILE command

Allows to copy a file from a directory to another one on PC.

 

Syntax

 

CHGVAR

VAR(&CMD) VALUE('COPYFILE')

CHGVAR

VAR(&PARM1) VALUE('

File="File to copy"

NewFile="Copied file"

[;Replace=true/false]

[;ReadOnly=true/false]

')

CHGVAR

VAR(&PARM2) VALUE(' ')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 &PARM2 &RESULT)

 

Parameters

 

Parameters

 

Parm1
or
Parm2

File : Complete path and name of the file to copy.

NewFile : Complete path  and name of the copied file.


Replace = true, to automatically replace the copied file if it already exits. Default value = false.

ReadOnly=true, to specify the READ-ONLY attribute on the copied file. Default value = false.

 

RESULT

Contains eventually error message.

 

 

 

Example

 

LNCCMD CMD(COPYFILE) PARM1('File="C:\temp\SBOOK_template.xls"; + NewFile="C:\temp\TEST\copy2.xls";replace=true')