Page 1 of 1

Safe overwrite

Posted: 20 Aug 2014 13:34
by binocular222
I notice sometimes, there's a backup file for overwrite operations (specifically some Microsoft Office files), sometimes, not. My question is:
- It's genereated by XY or by Windows or by Microsoft Office?
- When it's created? Is it self-destroyed after the overwrite operation is success?
- Today, I made a disaster when I overwrite a wrong files, thus destroy my whole work. The problem is: for most file operations (copy, move, rename, delete) I can undo, or even use recovery software in-case hard-delete, but for overwrite, all recovery softwares fail, no cure. I'm thinking of a "safe-overwrite" script which back-up specific file types on overwrite (rename to ~<base>.<ext> then set as hidden), but there's no Custom-Event-Action to detect whether I press "overwite". Any work around? May I suggest adding action "run specific sript" to Custom Copy - Name Collision dialog?

Re: Safe overwrite

Posted: 20 Aug 2014 15:26
by bdeshi
binocular222 wrote:May I suggest adding action "run specific sript" to Custom Copy - Name Collision dialog?
Why not ask for complete CEA implementation?
(We all need that, the more votes for it the better. :wink: )
======
binocular222 wrote:- It's genereated by XY or by Windows or by Microsoft Office?
XYcopy creates a copy of the overwrite target as "~SafeOverwrite.tmp" before beginning the overwrite, and it's deleted immediately after the operation is complete.

AFAIK, MSOffice generate tmp filenames have a few more symbols.

Re: Safe overwrite

Posted: 26 Jun 2017 07:12
by Filehero
I need to resurrect this thread.

Any Atom.io users around here?

I do use Custom Copy with Safe Overwrite by default (also during scripting, because it cannot be changed/deactivated there). When this way a file opened in Atom is overwritten, the name of the open file is suddenly changed to "~SafeOverwrite.tmp" (including a dirty flag). Since this is not happening with Notepad++, Atom might have implemented a Custom Copy detector by accident. :twisted:

Any explanation why one editor is getting the Custom Copy temporary file name?
before_custom-copy.png
after_custom-copy.png

FH

Re: Safe overwrite

Posted: 26 Jun 2017 18:42
by Filehero
@Don, is there a way to add a switch/flag for "Save Overwrite" to SC copyto (and their siblings)?

With my (rather small) source code files I could life without Safe Overwrite, but when script-wise syncing/editing my libraries across machines and SVN I cannot do without the state-of-the-art Name Collision dialog. :)

Re: Safe overwrite

Posted: 26 Jun 2017 21:01
by bdeshi
Filehero wrote:Any Atom.io users around here?

I do use Custom Copy with Safe Overwrite by default (also during scripting, because it cannot be changed/deactivated there). When this way a file opened in Atom is overwritten, the name of the open file is suddenly changed to "~SafeOverwrite.tmp" (including a dirty flag). Since this is not happening with Notepad++, Atom might have implemented a Custom Copy detector by accident. :twisted:
Not an Atom text editor user, but it sounds like Atom detects file renames on-the-fly! Potentially both a useful and unwanted feature. :kidding: Perhaps this can be disabled in Atom config? (if you want that)

Re: Safe overwrite

Posted: 26 Jun 2017 21:15
by Filehero
SammaySarkar wrote:Perhaps this can be disabled in Atom config? (if you want that)
No, I even checked the config at the sub-pixel level.

Since manually reloading the affected files each time is no real option, I might have to skip Custom Copy then. I can't give up Atom after I've made me a nice syntax highlighting.