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

martin

Ladelle wrote:

I thought that like the -delete on the get command that "Delete source remote file(s) after a successful transfer." would also do the same with synchonize if it was only a one-way sync.

Of course not. You would not end up with synchronized directories. That would not be a synchronization.
You are probably looking for this:
https://winscp.net/eng/docs/faq_delete_synchronized_files
Ladelle

I thought that like the -delete on the get command that "Delete source remote file(s) after a successful transfer." would also do the same with synchonize if it was only a one-way sync.
martin

You are doing synchronize local.
So the local folder is synchronized. No changes on the server/remote side are done.
Ladelle

The following;
file : --remotepath--/ITTest/demo.txt
and I beleive
file : --remotepath--/ITTest/TestRmtDir/Demo3.txt
path : --remotepath--/ITTest/TestRmtDir/

I have dozens of folders that I would be syncronizing and have a means of ensureing they are never empty so can't be deleted but any normal files,subfolders and subfiles should copy from remote to local and then delete.
martin

Re: syncronize with -delete - is -mirror also needed

OK, but I need some description, of what I should look for in the log. What file do you thing should have been deleted, but was not?
Ladelle

Re: syncronize with -delete - is -mirror also needed

Here is the log. As an additional note, the --LOCALPATH-- is a UNC location on a Windows server.

I had tried syncronize -delete local and syncronize local -delete but same result.

Brian
martin

Re: syncronize with -delete - is -mirror also needed

No you do not need to use -mirror to use -delete.
If you have a problem, please post a session log file.
Ladelle

syncronize with -delete - is -mirror also needed

Using the latest WinSCP Version 5.17.2 (Build 10278) (OS 10.0.18363) when trying to syncronize with delete, the log shows the reading of the -delete parameter put the source file is never deleted after transfer. Only doing LOCAL or REMOTE syncronize.

The -delete for GET documentation says it removes the files. Does it only work with SYNCRONIZE when -mirror is also used as the documentation mentions removing obsolete files?

Brian