Live data from Hacker News

How to lose your work using Undo Copy in Windows

mihai.fm

21–30 of 110 posts

Re: How to lose your work using Undo Copy in Windows

#21
It should be noted that files can often be recovered if you notice soon after accidentally deleting them. You need a file recovery tool that understands your file format (Recuva is a pretty good free tool) but you can save yourself hours of work if you act quickly.

These tools rely on the fact that Windows (and most other operating systems) don't zero out the filesystem when deleting files. This means that the file contents are still there, all you're really missing is the reference to the file contents.

As long as the disk doesn't get overwritten, the files can be saved. The more surefire way to recover files is to stop writing to the drive as soon as you notice your mistake. If you want to use your existing OS for file recovery (much easier, but less likely to succeed) you will need to kill any program running and start a recovery program as soon as possible. Chances are you can't mark the drive you saved the file to as read-only, so speed and luck are essential. It helps to have a file recovery tool installed already, so you don't have to download and install one, increasing the probability of overwriting your precious file contents.

Using easy tools like Recuva and some other paid software, you can often get files back, not only from the original location but also temp files that may have been left behind during editing.

The most reliable way I know involves a Linux recovery disk. It's not exactly beginner friendly, but even moderate knowledge of Linux and the command line can save you hours of work.

The most surefire way I know to recover files is to kill the machine (pull the plug, hold down the power button, etc., so the shutdown process can't write any new files) and to boot into a live Linux distro packing recovery tools. Kali has a bunch, but there are others as well. Make sure not to mount the drive read-write (you probably can't get it to mount automatically after a forced shutdown anyway) so it doesn't corrupt your files and then run recovery software.

Testdisk [1] can often find deleted files, though it's built to recover partitions more than it was made to recover files.

ntfsundelete[2] is a command line tool that was made to find files that were likely to be deleted. It's especially useful if you know the name of the file you're trying to recover.

foremost[3] and its fork scalpel [4] are command line forensic recovery tools originally written by a member of the USAF Office of Special Investigations. They're not as well-maintained as some other tools but they're very versatile if your file format may not be recognized by other tools.

Finally there's Sleuthkit [5], a file recovery tool that will run from Linux leveraging other file recovery tools as well as its own forensic recovery tools, bundled together with a nice GUI. This too was designed for forensic analysis more than anything, but the GUI can help avoid tedious command line work.

With bigger files this becomes harder, because the file may be fragmented and because the larger the file, the higher the probability that new files have been written on top of the old file contents.

For Bitlocker encrypted drives, you'll need to use a tool like dislocker[6]. Make sure to mount data read only though, because Bitlocker is proprietary and reverse engineered tools have a habit of corrupting data when writing to disk.

[1] https://www.cgsecurity.org/wiki/TestDisk

[2] https://linux.die.net/man/8/ntfsundelete

[3] https://foremost.sourceforge.net/

[4] https://github.com/sleuthkit/scalpel

[5] https://sleuthkit.org/index.php

Re: How to lose your work using Undo Copy in Windows

#23
post #19

Undo Copy is a fine feature; there was a recent post here about clipboards and managing the cost of large copied objects. The problem here is that "undo copy" acted as "undo paste", a ridiculous bug.

Exactly what I was thinking. Copy = context to clipboard, paste = clipboard to context.

Undo copy should only remove the copied thing from the clipboard.

Re: How to lose your work using Undo Copy in Windows

#24
post #11
post #7

A similar annoyance is the fact that excel's undo applies to all open excel files. Make a change in a.xls, make a change in b.xls. if you ctrl-z twice with b.xls focused, it'll undo both of the above changes! This has bitten me more than once. Does anyone actually want this behavior?

I ran into this issue and looked it up. It was an intentional design choice, and kind of makes sense when you realize that Excel sheets can have reference of each other -- they are not necessarily independent. Of course a lot of people probably never do that in their entire lifetime when using Excel and can feel annoying.

Sheets or docs?

Within one doc, and multiple sheets makes sense, I guess.

Across docs doesn’t make sense to me.

Re: How to lose your work using Undo Copy in Windows

#25
I tested to see what some popular Linux file managers do in this scenario, GNOME Files and KDE Dolphin. Neither of them have undo in the right-click menu. Pressing ctrl+Z pops up the standard "Do you want to permanently delete this file?" confirmation dialog.

Dolphin goes one step further, if you say yes to the confirmation dialog, it shows an additional one: "The file (copy) was copied from (original), but since then it has apparently been modified at (time). Undoing the copy will delete the file, and all modifications will be lost. Are you sure you want to delete (copy)?"

Re: How to lose your work using Undo Copy in Windows

#26
post #7

A similar annoyance is the fact that excel's undo applies to all open excel files. Make a change in a.xls, make a change in b.xls. if you ctrl-z twice with b.xls focused, it'll undo both of the above changes! This has bitten me more than once. Does anyone actually want this behavior?

Since Windows 11 includes extensive telemetry, it is possible that Microsoft intentionally designed it this way for user productivity.

Re: How to lose your work using Undo Copy in Windows

#27

"Undo copy" seems like it should not even exist. Delete does the same. Seems like the result of trying to hard to "improve" the UI.

Except delete sends the file to the recycling bin, where it can easily be recovered. Undo copy removes the file from disk!

Re: How to lose your work using Undo Copy in Windows

#28

Windows should just prompt for confirmation if the file differs. A reg key should allow a user to disable the confirmation.

Windows 7 does have a delete confirmation for Undo Copy. However, either Windows 8 or 10 removed that confirmation. More reason why people missed Windows 7.

Re: How to lose your work using Undo Copy in Windows

#29
post #11
post #7

A similar annoyance is the fact that excel's undo applies to all open excel files. Make a change in a.xls, make a change in b.xls. if you ctrl-z twice with b.xls focused, it'll undo both of the above changes! This has bitten me more than once. Does anyone actually want this behavior?

I ran into this issue and looked it up. It was an intentional design choice, and kind of makes sense when you realize that Excel sheets can have reference of each other -- they are not necessarily independent. Of course a lot of people probably never do that in their entire lifetime when using Excel and can feel annoying.

They could solve that by keeping track of references and asking you though.

Re: How to lose your work using Undo Copy in Windows

#30
post #7

A similar annoyance is the fact that excel's undo applies to all open excel files. Make a change in a.xls, make a change in b.xls. if you ctrl-z twice with b.xls focused, it'll undo both of the above changes! This has bitten me more than once. Does anyone actually want this behavior?

I think Excel is still the old mdi application that has been hacked to look like a sdi application. It’s only a recent innovation that it is possible to have two files open with the same filename.
Post reply on HN