Is there a way to Undo if I accidentally delete a Text Document?

I accidentally hit Cmd+delete twice when intentionally deleting a text document, so it deleted the target file and also the one underneath it. Fortunately I was paying attention and noticed it, so I hit Cmd+Z to undo the last delete. I was surprised that Scrivener did not Undelete the file.

Is there a setting to enable Undo in case of deleting a text document?
If not, why does this basic functionality not exist in Scrivener?

Thanks…

Did you also empty the Trash folder? Because that’s where it should be located now and from there you can retrieve it. Last folder in the Binder.

1 Like

Yeah. Binder elements are never definitively deleted unless you really want them to. Which is a two step operation.

Yes, I knew where to go to find it.
My question is about the lack of an Undo command in the Binder.
Undo functions in other capacities elsewhere in Scrivener.
And even in the Mac Finder, if a file is accidentally deleted, Cmd+Z puts it back where it was deleted from.

I don’t know. Probably because it very rarely happens (it does sometimes, obviously) and even then it’s easy to get the document back. But in theory you’re right, it is kind of inconsistent.

For me at least, ⌘z usually does not restore a deleted file in Finder, and Trash is my recourse (or restore from Dropbox or Time Machine). If it worked in the Scrivener Binder, how many levels of undo would be enough? There too, you have Trash and various project backups to fall back on. Supporting undo would likely work by causing Trash to proliferate, leading to its own problems

To be clear, I’m talking about restoring a file from the trash back to the binder. (Or in macOS from the trash back to its original folder - which has always worked for me for years.)

I’m not suggesting that Scrivener undo a file that has already been deleted from the trash. That is what backups are for.

I think the (much) bigger point, is that it is way to easy to delete a file, which may contain years of writing, with no warning.

Imagine an accidental delete that went unnoticed. After 10 backups (or whatever number is set in the backup pane of preferences) that file is no longer in the backup either. I make backups of my backups, so unlikely to ever happen.

But adding an option to confirm a delete would be a welcome feature. I frequently add files, but rarely delete them, so wouldn’t be obnoxious to me.

1 Like

Which is exactly why deleted files go into the project’s Trash folder, which is part of the Binder and will be backed up along with everything else in the project. Until you empty the Trash, a deleted file is as safe there as it would be in its original location.

Good point.
But I do occasionally empty my trash ;~}

Hi. The user is right about one thing: if there was an undo shortcut, we all would save time when putting the element back in its original place in the binder.

Regards.

1 Like

To be fair: In this scenario an Undo would make no difference (because there’s no reason to perform it).

Back in 2013 KB explained the problem in this thread:

Although the OP is concerned with “moving things around in the binder…” of course Deleting a document, i.e. moving it to Trash, is moving it around in the binder.

I presume that what Keith said then is still the case.

:slight_smile:

Mark

If you only discover an accidental deletion after the Trash is emptied, after all backups that contain that version of the Trash have rolled off, and after your Time Machine or other system backup has also rolled off the deletion … probably an Undo command wouldn’t help much either.

3 Likes

I myself am of the opinion that it is not way too easy to accidentally delete a file from the Binder. The simple expedient of using command-delete for deleting Binder items and simple Delete for everything else ensures that no one accidentally deletes a file when they thought they were deleting a phrase in the text or whatever.

And maybe I am being hardnosed, but if you are busy deleting files with cmd-delete and you delete too many, well that’s on you, and maybe having to go and drag them back out of the Scriv Trash will prompt you to be less cavalier when erasing your hard work! :thinking:

2 Likes

I thought about this earlier in the context of:

It’s likely the first thing I (and mlondon) would turn off, because it constantly gets in the way. This or one mindlessly hammers on the “Yes, I’m sure!” button. Let’s be real here.

Not saying an “Undo” command that works like in Finder would be unwelcome, but with the backstory of its absence in mind, probably not worth the extra programming workarounds required.

Hmm … I wonder why undo doesn’t work in Finder at my machine?

I don’t know. I just tried it with a file and a folder (even at the same time), Z brings them back.

The in ⌘ delete is my confirmation. It works the same in Scrivener as it does in Finder. I think it’s important that they work the same way.

It may be a view issue. If I see the file in a search result and delete it, ⌘Z may restore it, but it doesn’t return to the search result right away — or maybe ever, until I do the search again.

It works for me. Deleted a file from Finder search results ( ), restored it in the same view ( Z) and… I thought I see what you mean, but after about a second or so it showed up again. :thinking: (Still in those search results.)