synchronize and delete at one step

Advertisement

theUserWhoLikesScripting
Joined:
Posts:
4
Location:
Allemagne

synchronize and delete at one step

Hi

I have written this script :
option batch on
option confirm off
option exclude "*_110-*; *_210-*"
synchronize remote -delete d:\docs\test /srv/blabla
 
close
exit
Execution (would) delete(s) all files in balbla, that don't exist in test AND
transfer all files to blabla, that don't match my filter

My question : How can I modify the script to make it delete all those files with "*_110-*; *_210-*"?
Or do I have to get them away with rm?

Thanks

Reply with quote

Advertisement

JuValencia
Guest

Re: synchronize and delete at one step

Hi, I have something like that, how can I automate the delete file after synchronize. Would you help me with the command.

so far This is my automated command-line syntax
C:\> winscp.com  /command "option confirm on" "option include "ven*.pgp"" "open sftp://user:pass@RemoteServer" "synchronize local c:\Test\ /remoteFolder -delete" "exit"
Basically My local folder test should get synchronize from the Remote folder, and after the synchronization is done, I should the delete the files from the Remote server.

Reply with quote

martin
Site Admin
martin avatar

Re: synchronize and delete at one step

JuValencia wrote:

Basically My local folder test should get synchronize from the Remote folder, and after the synchronization is done, I should the delete the files from the Remote server.
Then you should use get -delete instead of synchronize, shouldn't you?

Reply with quote

Advertisement

mark.k
Guest

Re: synchronize and delete at one step

Question based on the messages above:

I don't want to use the command rm after get or synchronize. In that case, I will take the risk files being deleted that are added to the remote folder during the synchronize or get process. Is there an option to delete the files within the synchronize process or use local filenames-list in the rm command-'array'?

To make things clear:
I need a program to:
*Check if files are added to the remote folder
*Download added files
*Delete the files in the remote folder that are available locally
*No files may get lost during the process

Thanks,
Mark

Reply with quote

Advertisement

You can post new topics in this forum