#### Sample Code for File Move

The sample code below should be entered inside the Edit window's Command Mode, not inside the File I/O dialog box.

The following code asks for a file name to move and a location directory and file name to move to and then performs the file move operation.

C1=COMMENT/INPUT,Please type a file you want to move.

,(Include full file path)

C2=COMMENT/INPUT,Please type a destination file name.

,(Include full file path)

V1=FILE/EXISTS,C1.INPUT

IF/V1<>0

COMMENT/OPER,File exists to move. File move commencing.

FILE/MOVE,C1.INPUT,C2.INPUT

V2=FILE/EXISTS,C2.INPUT

IF/V2==0

COMMENT/OPER,"File doesn't exist at: " + C2.INPUT

,The MOVE didn't function properly.

PROGRAM/END

END_IF/

ELSE/

COMMENT/OPER,File MOVE successful.

PROGRAM/END

END_ELSE/

END_IF/

COMMENT/OPER,Original file doesn't exist. Try again.

Code Explanation

Much of this code is similar to that explained in "Sample Code for File ".

Only explanations unique to this example are given here.

FILE/MOVE,C1.INPUT,C2.INPUT
This line copies the original file to a destination file. This command takes two parameters.

· Parameter 1 is C1.INPUT. This is the full path to the file to move.

· Parameter 2 is C2.INPUT, or the full path to the destination file.