rename {filename1} {filename2}
Where:
filename1 | is the name of an existing file or folder on the remote host computer. |
filename2 | is the name to which the file or folder will be renamed. |
It either filename1 or filename2 contains a space it must be enclosed in double quotes. For example:
rename "file 1.txt" "file 2.txt"
Examples:
rename file1.txt file2.txt
rename newfile.new newfile.old
rename "file 1.txt" "file 2.txt"
Return Codes:
550 | This return code can be caused by any of the following: |
• | filename1 not found in the current directory on the remote host computer. |
• | filename2 already exists in the current folder on the remote host computer. |
Sample Script:
* Sample script using the "rename" command
* Upload test.txt
put test.txt
* rename test.txt
rename test.txt test2.txt