Deleting Files in DevonThink Database Using Finder....

Hi, have a simple question, but one I can’t seem to find the answer to.

If I look for a file I want to delete using spotlight, I can see it both in my normal file directory, and in the DevonThink database (as I imported many of them into DT). Is there any harm in deleting such files using finder, rather than from within DevonThink itself – i.e. will it screw up the database in any way?

Thanks.

You should delete the file from the database, else the database will have incorrect information about the existence and location of the file.

When you say delete “from the database”, you mean delete from within the DevonThink program, right? I experimented a little, and things I deleted using finder didn’t seem to be locatable anymore from within DevonThink (implying that they weren’t being tracked anymore as part of the database). But this approach will, presumably, cause me problems down the road?

As the items you are talking about are visible to Spotlight, they have been Index-captured into your database. And for Word .doc files they are a special case in that even if Import-captured the .doc files remain externally linked and are visible to Spotlight.

It’s quite true that such items, if deleted in the Finder, will also disappear from the database after the Synchronize command has been invoked. (Except for Import-captured Word files.)

There will not be a disastrous outcome for your database if you have deleted Index-captured items from the Finder.

But there will be at least for a time a lack of correspondence between the database and the Finder. You will have “ghosts” of items in the database. And in the case of Word .doc files that have been Index-captured, the text content of the file will be visible. For Word files that have been Imported and then deleted from the Finder, the text content will remain in the database until explicitly deleted from the database, but with a broken Path.

If you delete an Index-captured document from within the database, you will be given the option to also delete the externally-linked file from disk. That’s just neater. But the Internal Revenue Service won’t grab your paycheck if you delete files from the Finder. :slight_smile:

Thanks for your responses Bill.

But just to clarify, I have no files outside of the DevonThink database indexed within the data base.

So, for example, I have 4000 pdf files on my HDD right now, and the same 4000 physically present within the DT database (they were imported, while leaving the original PDFs alone). Now, if I search in spotlight for xyz.pdf, two turn up: the one in my documents, and one in the .dtBase . I think the instructions re “ghost” files & stuff doesn’t apply in this case (does it?). Nor does any issue relating to synchronization.

So any problem in deleting one or both of the xyz.pdf’s from finder? i.e. does erasing files held within the DT database from finder cause any potential problems? It sounds like not, but maybe my original question was insufficiently clearly laid out.

From your original post I assumed that you were talking about Index-captured PDFs. In that case, the only copy of the PDF would be external to the database itself. Deleting the PDF in the Finder would result in a loss of information to the database.

Can Spotlight see PDF files stored inside the database?

No, in the 1.x versions of the DEVONthink applications, Import-captured PDFs are copied and stored into the Files folder inside the database package file and are not visible to Spotlight.

If you import a PDF named “Harry.pdf” into your database you now have two copies of that file on your hard drive, only one of which is visible to Spotlight.

Once you have Imported (copied) a PDF into your database you can delete the original Finder copy of that PDF without affecting the database in any way.

If you export the contents of your database to the Finder, e.g. using Scripts > Export > Daily Backup, of course those files will be visible to Spotlight.

My preference is for self-contained databases using the Import capture mode. I usually delete files that have been copied into the database, or move the database to a different computer, in which case the contents of the database have no meaningful correspondence to the Finder files seen by Spotlight. I do my searches within my database much more rapidly than Spotlight searches and with a much more useful working environment for examining or organizing the search results.

Note: A future major upgrade of the DEVONthink applications will modify the database structure, and Spotlight will be able to see files stored inside the database. That will have uses in supporting searches across databases. But Spotlight searches will seem even slower and less powerful than DT searches.

As you can tell, I’m looking forward to inclusion of DT database contents in Spotlight searches. But every time I do a Spotlight search in Tiger there are aspects of the results list and working environment that irritate me. It will be somewhat less irritating in Leopard.

Thanks again Bill – but I am still confused…

In spotlight I can see two copies of (almost) all my PDFs, one in my normal documents, one in a directory called Documents/DevonFiles/DevonThinkM.dtbase/Files.

You seem to be saying that I shouldn’t be seeing these pdf’s which were imported into the database (i.e. that I should only be seeing the one copy still in my normal HDD directory). Does that mean that I have re-exported the database pdf’s (without realizing) or something of the sort?

As an experiment I just imported another PDF into DT – in this case I can’t seem to see it in spotlight – a bit confusing… Any thoughts?