Topic "Scripting: "get -delete" doesn't work"

Author Message


I'm using a script to download files and delete them after download.

using the commands

get *.txt myfolder
rm *.txt

works, but if files are uploaded in between these commands, they are being deleted without having been downloaded.

So I tried

get -delete *.txt myfolder

which results in this:

2008-07-02 17:47:05.654 Listing file "-delete".
> 2008-07-02 17:47:05.654 Type: SSH_FXP_LSTAT, Size: 21, Number: 263
< 2008-07-02 17:47:05.732 Type: SSH_FXP_STATUS, Size: 31, Number: 263
< 2008-07-02 17:47:05.732 Status/error code: 2, Message: 263, Server: No such file, Language: en
. 2008-07-02 17:47:05.748 Closing connection.

Where's my mistake? Thanks for a clue
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24736
Location: Prague, Czechia
All scripting switches (including -delete) are supported since 4.1.x only.
Martin Prikryl


Thanks Martin, for your help and for WinSCP in general!!!

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License