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

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: synchronize and delete at one step

theUserWhoLikesScripting wrote:

Or do I have to get them away with RM ?
Correct.
_________________
Martin Prikryl

Reply with quote

JuValencia
Guest

Re: synchronize and delete at one step

martin wrote:

theUserWhoLikesScripting wrote:

Or do I have to get them away with RM ?
Correct.

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
Joined:
Posts:
27,253
Location:
Prague, Czechia

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.
That you should use "get -delete" instead of "synchronize", shouldn't you?
_________________
Martin Prikryl

Reply with quote

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