MoveFile

Top  Previous  Next

 

The MoveFile command allows you to move a specified file to another location.

 

Command Syntax

 

MoveFile:[SourceFileName],[TargetFileName]

 

The colon after the command and the space between parameters are compulsory. Any additional spaces or characters will cause an error to be thrown. The command itself is not case sensitive, but parameters may be depending on the operating system and locale.

 

Parameters:

 

SourceFileName: The fully qualified path and file name identifying the file to move

TargetFileName: The fully qualified path and file name to which the file should be moved

 

All parameters are compulsory. If any parameter is missing or invalid an error will be thrown. The parameters must be surrounded by quotation marks if one or more spaces are included in the path and file name. It is good practice to include the quotation marks in any case, so that it reduces the risk of error when writing scripts.

 

Example:

 

MoveFile:"C:\Test Text.txt","C:\Temp\Test Text.txt"

 

See Also: Conditional CopyFile DeleteFile RenameFile