Delete local files to recycle bin when synchronizing

Advertisement

HawkTroy
Joined:
Posts:
1

Delete local files to recycle bin when synchronizing

I'd like to synchronize my local directory with a remote one (mirror from remote to local).
However, I'd like to delete my local files to recycle bin instead of permanently.

When I'm using GUI, local files seem to be deleted to recycle bin by default (an apparent contradiction with documentation), and I couldn't find any option that controls this behavior.
When I'm doing the same synchronization using script, local files are all deleted permanently.

Is there any option that I can add to the command that can change this behavior?
If not, I'd like to request this feature.

I am using the latest version of WinSCP. My script is very short and simple:

sycn.bat:
"C:\Program Files (x86)\WinSCP\winscp.com" /log=log.txt /xmllog=log.xml /script=sync.txt
sync.txt:
open [site]
synchronize local -delete -mirror -criteria=either -transfer=binary  [local directory]  [remote directory]
exit

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,488
Location:
Prague, Czechia

Re: delete local files to recycle bin when synchronizing

HawkTroy wrote:

When I'm using GUI, local files seem to be deleted to recycle bin by default (an apparent contradiction with documentation),
Where do you see the contradiction? The documentation says:

Deleted local files are moved to recycle bin if preference option Delete local files to recycle bin is enabled only.
The option is enabled by default.

... and I couldn't find any option that controls this behavior.
See above.

Is there any option that I can add to the command that can change this behavior?
No, it's not supported.

If not, I'd like to request this feature.
OK, will see if more people ask for this.

Reply with quote

Bulldust
Guest

Re: delete local files to recycle bin when synchronizing

Hi...I am also trying to do the same as HawkTroy using WinSCP 5.5.6 build 4746)
As much as the current default behavior in the GUI is to delete to the recycle bin, when I run a mirror script(exactly the same as Hawktroy's) the local files are deleted permanently instead of going to the recycle bin which results in data loss.

I thought WinSCP in such a case uses the default delete command in Windows? Looks like the script is somehow using Shift+Del instead
Doesn't the script use the configured environment preferences? Seems like a bug to me...

ps: Thanks for the support & great software!

Reply with quote

Advertisement

You can post new topics in this forum