Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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: unable to delete local files

WinSCP won't obviously remove exiting local files if they are also present in the source remote directory. That's a point of synchronization.

If you want to download all files not present in the local directory and then delete all previous local files, you have to implement this on your own.

You can use synchronization and then iterate all local files, deleting those that were not synchronized.

I suggest you use Session.SynchronizeDirectories from WinSCP .NET assembly from a PowerShell script..

See this example:
https://winscp.net/eng/docs/library_example_delete_after_successful_download
It employs mechanisms you need for implementation.
Nishant Shah

unable to delete local files

Dear All,

i am trying to sync remote files with the local files (the newer files are in the remote ftp). my aim is to download only newer files from the ftp so i am using the synchronize local -delete command (i already have the lcd and remote dir set). what i see is that the newer files are downloaded but the old file still remains in the local dir. please note that the files in the remote dir are incremental and hence will contain the older file also.

Nishant.