Post a reply

Options
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)

Options

Topic review

martin

Re: Get or synchronize -delete blows away directory structure

There's no simple way to achieve your custom task.
scott@...

Get or synchronize -delete blows away directory structure

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.