Preserve overwritten remote files to recycle bin for SCP

Advertisement

Guest

Preserve overwritten remote files to recycle bin for SCP

Hi,

It would be really great if the option "Preserve overwritten remote files to recycle bin" (as described at https://winscp.net/eng/docs/ui_login_recycle_bin) would also work for SCP (and eventually FTP). I think this shouldn't be too difficult. I really like to make backups of the files I've overwritten. Unfortunately many editors don't support such features and I thought WinSCP would be the ideal solution, but then I figured out that the option only works for SFTP at the moment.

Thanks in advance!

Jeroen

Reply with quote

Advertisement

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

Re: Preserve overwritten remote files to recycle bin for SCP

This cannot be done. At least not for batch (multiple-file) transfers as with SCP the upload is server-driven. It may be solved for single file uploads, but the behaviour will become pretty inconsistent then? :-)
_________________
Martin Prikryl

Reply with quote

Guest

Why can this be done with SFTP and not with SCP? It seems to me that this can do the trick:

When transferring a file, before transferring it to the target directory, always first copy the current file in the target directory with the same name (if it exists) to the "recycle bin" (i.e. /tmp) with filename name-timestamp.ext.

This may take some extra time, but it is to the user to decide to enable it (perhaps you can put a warning next to the option). Now it is absolutely not possible, then it is! I think many users would use this feature, even it will make the transfers a little bit slower.

Reply with quote

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

With SCP, once batch transfer is started no other action can take place, until the batch transfer finishes. Also when uploading whole directory, there's no way to check whether the files in the directory already exists on remote site. That's also the reason why there are not overwrite confirmations for uploads of files in folder for SCP.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum