Accidental deletion of 2500+ files from Finder

Hi! I am new to DT…just about a week into using it. This morning, I discovered that I had accidentally deleted over 2500 files from my Finder. I’d like to not make this mistake again. Would appreciate any thoughts and guidance on the following situation:

Although I have 10+ years of research files, I decided to start small with a new project where I’m adding only new archival material and secondary sources related to a very discreet research topic.

  • I am INDEXING vs IMPORTING these files.
  • The Indexed files are contained in one specific folder, deep inside my Finder.

As I tested DT, I created two Databases. Decided method for working in DB#2 was better than DB#1. Last night – in a haze of late-night work – I deleted a trial DB#1. There was some window with a warning that came up, and I clicked way too haphazardly.

This morning, I discovered that I had accidentally deleted over 2500 files from my Finder. Weirdly, the files deleted ARE NOT FROM THE FOLDERS I WAS INDEXING IN DB#1. The deletion was far more extensive. It went up one level from the folder I was indexing and deleted files across those subfolders. Like I was indexing Folder A >> Folder 1. I lost files from Folder A >> Folder 2 and Folder A >> Folder 3.

Good news: The files are all in my Trash.
Bad news: All the file structures are gone.

I have two questions:

  1. Is there a way to see in the log what action I took last night at 12:03 am (the timestamp that all these files were deleted)?

  2. Can you point me to some posts about best practices for indexing DT files and folders ?

Aside from the index/import; you should also be backing up your data

> Bad news: All the file structures are gone

I organize with tags instead of folder structure

1 Like

My advice is just to import. I really don’t see the point of having DEVONthink 3 and keeping everything in the regular finder? I might be missing something I guess…
I have to say that I hardly use file structure any more: just the search functions on DEVONthink 3.
Just try not recreating the file structure and see how it goes. As DTLow says the files should be backed up all the time anyway. I lost a few one time and I learnt the lesson.

1 Like

Welcome @christinaweyl

  • Deleting a database does not delete indexed files. Can you clarify what you actually deleted?

  • If the files exist in your database after deleting them in the Finder, they weren’t indexed but imported. Importing copies files into the internal structure of the database.

  • Indexed groups deleted through DEVONthink will lose their group structure when moved to the Trash. There is no way to recover the structure outside restoring from your backups.

Have you read and understood the In & Out > Importing & Indexing section of the Help and manual?

I want to add another thing to this disaster: make backups. Time Machine is good enough, but you could use any other backup solution.


Wouldn’t “put back” from the Trash’s context menu re-create the folders etc? Alternatively, just restore your latest backup before the disaster.

Which log? There are tons of them, but I doubt that any log will register when you delete, move or change a file. That’s simply not useful, as the log would soon grow to be bigger than the files they’re logging.

  1. I will try to explain exactly what deleted. I maintain a root folder for all of my freelance activities (“Folder 1”). Inside that, I have several subfolders based on large categories (“Folder A” through “Folder E”). Inside these sub-folders, I have sub-sub-folders which pertain to specific projects (“Folders AA” through “Folder EE”). The folder I was indexing into DT was one of these sub-sub folders (let’s say path is Folder 1 >> Folder A >> Folder AA). However, the deletion affected folders outside of Folder AA. Affected folders and files were in the sub-level (Folders A-B-C-D-E). These folders were NOT IN ANY WAY INDEXED OR ASSOCIATED with DEVONthink.

  2. Nothing was imported.

  3. Again, these folders (where group structure was lost) were not indexed into DT.

  4. Yes, familiarizing myself, though definitely have a lot to learn. I believe the warning window was the one illustrated on p. 55. I cannot remember, however, what I pressed.

Thank you @rfog. I have both Carbonite and iCloud running and am slowly restoring based on these backups. But am going to add Time Machine to provide another layer of protection.

1 Like

Did the indexed folders contain any aliases or symbolic links?

@cgrunenberg Possibly? I have a lot of aliases in my Finder folder structure. There might have been one alias in the indexed folder. If the “deletion” targeted alias links, there appears to have been a cascade of deletions outside the indexed folder. Like a heat-seeking missile!

@cgrunenberg: I couldn’t reproduce an issue where a folder with an alias deleted the alias’ target folder in the Finder. However, it seems to inhibit deleting a folder with an alias.

…Removed All Items…

The AA folder still lives on in the Finder.

After manually removing the alias in the Finder, the subgroup – and the Finder folder – will be removed.

DEVONthink does never delete folders which still contain items (and aliases aren’t indexed).

OK all. I’ve played around in DEVONthink some more. And, I’ve got a new backup system using TimeMachine. Phew.

I am still only Indexing in my DB, to mirror what I see in Finder. Nothing is imported.

When I go to delete my Trash, it prompts with the window @BLUEFROG showed. If I select “Remove All Items,” it should delete from the Trash: 1) indexed items that I manually deleted, and 2) anything that was inadvertently imported into the database (I am still learning).

My question about group #1 is, these things are no longer appearing in my Finder but there is a vestige of them in the DEVONthink Trash folder. Correct?

Please don’t hijack threads – new question, new thread. That makes it easier to search and find topics.

I would highly suggest to test this first using test files/folders on your own and to have a closer look at the section Importing & Indexing of the documentation.

1 Like

If you do see some unusual behavior, like indexed files in the Finder not disappearing when you empty a database’s Trash, double-check you haven’t indexed the same Finder folder into more than one database.