[REQ] File-Compare Editmode: Backups only optional

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

[REQ] File-Compare Editmode: Backups only optional

Post by *StatusQuo »

A new .BAK-file is created everytime when saving a changed file in File / Compare By Content / Editmode.
I personally already have backups of almost everything, so from my point of view these additional .BAK-files are just a waste of disk space - in most cases.

=> Could creation of .BAK-file please be made optional?
An additional checkbox in the GUI would probably be more than what is needed, a switch in WinCmd.INI would be enough for me.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
petermad
Power Member
Power Member
Posts: 14810
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I suggest the folllowing change:
CompareSaveOriginal=1
1: When saving, the file is copied to filename.bak, then the data is written to filename. Advantage: additional streams, special attributes etc. are preserved.
0: When saving, the data is written to filename.tmp, then the file is renamed to filename.bak, and finally filename.tmp is renamed to filename. Advantage: The file has to be written only once, and remains intact in case of a write error.
Could be changed to:
CompareSave=1
0: No backup file is created when saving changes to a file in the Compare by Content tool.
1: When saving, the file is copied to filename.bak, then the data is written to filename. Advantage: additional streams, special attributes etc. are preserved.
2: When saving, the data is written to filename.tmp, then the file is renamed to filename.bak, and finally filename.tmp is renamed to filename. Advantage: The file has to be written only once, and remains intact in case of a write error.
Last edited by petermad on 2007-04-15, 01:32 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Zero missing

Post by *Clo »

2petermad

:) Hello Peter !

• The “0” flag is indeed missing, I support your suggestion.

• And I close my ears about some «security reasons» we could get as a pie-answer… :lol:

:mrgreen: FR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Stance
Power Member
Power Member
Posts: 1079
Joined: 2005-03-29, 06:26 UTC

Post by *Stance »

And heeere is ghisler(Author)'s answer: :!:
File-Compare, Editmode: Backup destroys NTFS File-Hardlinks
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

(Bump) - How about the option to automatically delete the backup file after closing the Compare window,
as suggested in File-Compare, Editmode: Backup destroys NTFS File-Hardlinks ?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

At the moment I still consider this as too risky. The compare tool may have some yet undetected errors. Maybe I will add it in 1-2 years...
Author of Total Commander
https://www.ghisler.com
User avatar
sas2000
Power Member
Power Member
Posts: 682
Joined: 2003-02-07, 04:32 UTC
Location: Galiza

Post by *sas2000 »

 
ghisler(Author) wrote:Maybe I will add it in 1-2 years...
         :shock: :shock: :shock:
        
 
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Another idea: how about creating the backup-files in the system temp dir, like

Code: Select all

%TEMP%\_tcbak\drive\path\*.*.bak
?
I wouldn't mind if I had to turn on an option for this, of course. ;)
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Workaround for the meantime, until the backup files can be deleted by TC:
AutoHotkey: Auto-Delete BAK-files created by TC's File-Compare-Editor

(For those who trust TC's editor, use at your own risk.
The files are moved to recycle bin, if possible - no guarantee though.)
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
Post Reply