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

mark.k

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
martin

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?
JuValencia

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.
theUserWhoLikesScripting

Thanks

I was expecting that
martin

Re: synchronize and delete at one step

theUserWhoLikesScripting wrote:

Or do I have to get them away with rm?

Correct.
theUserWhoLikesScripting

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