Topic "Synchronzie local. Need to delete the remote files."

Author Message
cdsnl
[View user's profile]

Joined: 2015-10-09
Posts: 1
Location: Netherlands
Hi,

I am try to synchronize with the local option. This works really nice. Alle files including subdirectories are downloaded to my local directory.
But now I need to delete the remote files which are downloaded. But the need to stay in my local directory.

I do not get to figure this out how to do this. See the script below to see how it is working now without deleting remote files.

Thanks
Andre

///Script
open ftp://user:password@ftp.site.com
option confirm off
synchronize -preservetime local d:\mcc\archive /TestSync
close
exit
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Please read FAQ:
http://winscp.net/eng/docs/faq_delete_synchronized_files
Guest




Thanks for your reply
With "get" this not a problem. I know.
But the issue is that I do not know up front which subdirectories there are on the remote location.
The external process on the remote server creates at random serveral subdirectories (up to 5 deep, and every day it can be different subdirectories) and places files in these directories. And I need all files and when the files are downloaded they can be deleted from the remote server.

Any idea?

Thanks
Andre
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
That's what the last section in the referenced FAQ deals with (I've updated it now to show an easy solution using -neweronly available in recent versions of WinSCP).
Advertisements

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License