MOVE Move one local file to another location |
Top Previous Next |
This script command moves the source file (copies and deletes) to the destination location.
The following is a valid command and will work correctly assuming C:\test\file exists and C:\test2 exists and is a directory.
MOVE "c:\test\file" "c:\test2\file"
If test2 is an existing folder, the following moves a file to the folder while retaining the original file name.
MOVE "c:\test\file" "c:\test2"
Otherwise, file is moved to the root folder of drive C: and renamed to test2.
The following moves all files and folders in C:\test to C:\test2. Effectively this renames test to test2.
MOVE "c:\test" "c:\test2" /subdirs /emptydirs
The following moves all files and folders in C:\test to C:\test2\test. Effectively this renames C:\test to C:\test2\test.
MOVE "c:\test" "c:\test2\" /subdirs /emptydirs
After that command is complete there will be no folder C:\test left and c:\test2 will contain all the files and folders that used to reside in C:\test. The following moves all files and folders in C:\test to C:\test2 but leaves C:\test existing after it is complete.
MOVE "c:\test\*" "c:\test2" /subdirs /emptydirs
If you omit the path name portion of an argument, Robo-FTP assumes that the file is (or will be located) in the working folder. For example, the following moves a file from the current working folder:
MOVE "file" "c:\test2\file"
After any files have been moved, the %copyfiles internal script variable is automatically populated with the destination path of all such files.
Use the FTPRENAME command to move files on a remote site.
Related command(s): RENAME, FTPRENAME, MAKEFILENAME, COPY, APPEND, DELETE, DOSCMD, WORKINGDIR, Using the %copyfiles Variable
|