Topic "get -delete command not working properly"

Author Message
winonahealth
[View user's profile]

Joined: 2012-11-12
Posts: 2
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.
winonahealth
[View user's profile]

Joined: 2012-11-12
Posts: 2
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
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License