Reputation: 11
I using passive mode FTP command provide by NCFTP, Currently i want to pass a raw ftp command after file transferred. i found that got an option to do that:
ncftpput -u user -p password -X "rename 123.exe 1234.exe" host /path C:\123.exe
however, it is not working. It can put the file, but rename command not working.
Have anyone did that before?Pls help
Upvotes: 1
Views: 7640
Reputation: 31
-X use RAW FTP commands
Use the following syntax:
ncftpput -u user -p password -X "RNFR 123.exe" -X "RNTO 1234.exe" host /path/123.exe
Upvotes: 3
Reputation:
It works with ncftls as well. It is more immediate if you what you have to do is just a rename without actually uploading anything on the FTP server. (-W is like -X. The only difference is that it does the rename immediately after logging in) Here is the syntax:
ncftpls -u name -p psw -W "RNFR FTPfolder/anotherFolder/OLDname.txt" -W "RNTO FTPfolder/anotherFolder/NEWname.txt" ftp://ftp.name.org
Upvotes: 0