Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Version out of date

It looks like it's time for an upgrade. I didn't realize the version we were running was so out of date :p

The -delete command was introduced to WINSCP in version 4.1

get -delete command not working properly

While working from the command line, I run the below command and it works as expected. It opens the FTP, takes out all .pgp files and places them into my local 'test' directory.

D:\Program Files\WinSCP3>WinSCP.exe /command "open companyStaging" "get TestFolder/*.pgp D:\ftp_files\test\" "exit"

My issue comes in while trying to clean up the remote directory with the '-delete' command added.

D:\Program Files\WinSCP3>WinSCP.exe /command "open companyStaging" "get -delete TestFolder/*.pgp D:\ftp_files\test\" "exit"

For some reason, it is treating '-delete' as the file name and returning "Can't get attributes of file '-delete'. No such file or directory. Error code: 2"

I've searched the forums and found no other examples, I'm not sure what could be happening. Any suggestions?
I have also tried putting the commands into a script and calling it, but came up with the same results.