Topic "Put -delete blows away directory structure"

Author Message


How can I keep my local directory structure after issuing a put -delete command to move all files, to a server with same directory structure?

Here's the scenario
Local directory is a windows share with a directory structure I want to keep
Remote directory is an SFTP server with same directory structure I need to present to clients
I use winscp to transfer files only but I need to remove files from local directory after transfer so after clients delete them they don't return.

example non-working script line "put -delete -filemask=|To_Company\ *.*>0K"
If I remove ">0K" then it deletes all directory structure except for the "To_Company" directories, I need to keep the structure and just delete the files.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24759
Location: Prague, Czechia
WinSCP cannot do this.

You would have to code it, for example using WinSCP .NET assembly.

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