Topic "Get or synchronize -delete blows away directory structure"

Author Message


I'm using WINSCP to synchronize files between a SFTP (Linux) server and a Windows Share. I need to keep the directory structure in place on the SFTP server but delete the "files" after a successful transfer. I'm running a winscp script using a Windows Task.

I've tried both get and synchronize without much success, I can get the files to the share but I end up deleting the directory structure when trying to use -delete. Is there a way to filemask -delete? I don't want to go to either powershell ot xml - I need to keep this simple to support.

One other option is to delete the files after someone moves or deletes them from share - but I can't risk deleting files that have come in since last synchronization.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26911
Location: Prague, Czechia
There's no simple way to achieve your custom task.

You can post new topics in this forum


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