Hello, I'm trying to implement a script which will move the documents from the remote crushFtp site to the local and also removes the files on the remote side simultaneously. I'm able to copy the files but not able to delete the files on the remote side. Could you please help. Thanks in advance!
This all depends on t he client your using... Our own command line client has a command called "move" instead of just "get" and it does exactly this.
Maybe it would be better for you.
Thank you, Ben. I have actually checked this link http://www.crushftp.com/crush8wiki/Wiki.jsp?page=CrushClient before reaching you. "move" command is not mentioned there.
Upon your response, I have implemented "move" command to the script. It's working fine if I try to move the files from local Windows directory to CrushFTP site. But it's failing when I try to do it vice versa.
After checking the log, I came to know that the script is wrongly recognizing CrushFTP's file path as a local directory file path.
Actual remote CrushFTP filepath: ICERTIS_OUT\VTMF-UAT\ICM2VTMF
Actual local directory path: D:\temp\Script
The command I have mentioned in the script:
move "VTMF-UAT/ICM2VTMF/*.pdf" "D:\temp\Script\From_mBox\"
Below is the error:
java.io.FileNotFoundException: No such item:D:\temp\Script\ICERTIS_OUT\VTMF-UAT\ICM2VTMF
at java.lang.Thread.run(Unknown Source)
Could you please guide me. Thanks!
It tried referencing the folder path...
First "cd VTMF-UAT/ICM2VTMF" then do
move *.pdf "D:\temp\Script\From_mBox\"
Thanks for your swift responses, Ben. I've actually implemented the "move" command as you suggested.
Even though I have mentioned the remote path with "cd" command, it's just wrongly picking the local path where the script and crushtunnel files are present and just failing to move the files.
Previously, I have implemented the "get" command with success.
Command: get "VTMF-UAT/ICM2VTMF/*.pdf" "D:\temp\Script\From_mBox\".
But I'm looking to move the files instead of just copying. I also tried to implement "del" command after "get". But I observed that "del" command also picking the local path just like "move" and failing.
Could you please suggest any other alternative way / command to move the files.
Show me your script (no passwords) now that you tried for the Move attempt, and what it logged.