Deleting titled folders in a database

I have a database with 37000 folders of mixed Kinds contained in many Groups. I want to slim down the contents by removing a considerable number of folders so that I end up with only folders entitled Document in the Name column and PDF Document in the Kind column

I would like to delete all folders entitled Email Message in the Kind column of which there are many but I only want to delete those Email Messages which have no attachments ie no paper clip after the title in the Name column. I need to do this so that I can check those remaining with attachments to see if any of the attachments should be opened and entered as a Name Document Kind PDF document, if youā€™re still following me!

On the same topic another Kind is entitled PDF+Text. Within this category many are entitled ā€˜IDā€™ in the Name column. I would like to delete those

Is any of this possible and, if so, how do I do it please? I fervently hope that the answer is no and I have to do it manually!!

Is it possible to delete all of those folders without affecting the Groups in which they are located?

A little confused: you have 37,000 folders and you also have some unreported number of groups. Folders and groups are usually the same thing, unless of course youā€™re counting smart groups.

Otherwise, you can do all of what you wanted to do by setting up various smart groups with the search parameters you outlined in your post. Inspect the smart groups to confirm that the documents shown in a given smart group are the ones you want to delete. Then, select the documents that should be deleted and use ā€œFile > Move to Trashā€.

(Thereā€™s a shortcut for sending documents to the trash, but when doing drastic changes to a database I prefer to think about what Iā€™m doing and use the slower approach of clicking a command in a menu.)

Start this process slowly and carefully. Creating one smart group at a time (say the Email messages), and spending time inspecting the results before making deletion decisions.

If you have 37,000 things to look at, spread the work over several days or longer.

Itā€™s a good idea also to look at the Trash one last time just to be sure before you empty the trash.

Keep good backups (multiple backups for example) of your database(s) before doing major surgery on them.

Or, as you said:

Sure, OK. Yes, the answer is NO if thatā€™s what you want to hear!! LOL

2 Likes

You canā€™t delete a group without deleting its children, groups and files.

Itā€™s unclear what your end product is supposed to look like.
Please mockup a small sample of what the end result is and post a screen capture of it.

Not completely clear on the criteria,
but my go-to solution is an Applescript
It can delete the required records based on your rules

The closest thing coming to my mind is ungrouping.

Thanks to all who have commented. I apologise for not having made the position clearer

I have a simple business which basically involves finding out clientā€™s requirements then meeting the client, taking ID and witnessing their signatures to their document(s)

I create a Group for the year, which itself is a sub group of the main named database.
When a client first makes contact I create a sub Group with a date and their name.
All subsequent notes, documents and emails are filed as folders in that sub Group

Iā€™ve kept records for the last 18 years so Iā€™ve got something like 3000 client sub Groups containing 34000 folders

I attach a screenshot of a mock up as suggested by Bluefrog to explain the setup which contains examples of the folders I want to delete and those I want to keep

While DT has been a godsend to sort my Groups and Folders on a day to day basis, the info Iā€™m required to keep by my Regulator is probably no more than 4000 Folders containing copy documents, the rest is not relevant for this purpose, hence my wish to produce a shrunken database

My use of DT has been extremely basic, Iā€™ve just used it as a database and to my shame have used almost none of the whistles and bells available. In those circumstances it wonā€™t surprise you to learn that I have never knowingly created a Smart Group, so youā€™re going to have to be gentle!

Korm made it sound wonderfully simple, if I had the expertise! Iā€™ve got a copy of Joe Kisselā€™s Take Control of DEVONthink 3 which has been helpful in the past and I probably just need pointing in the right direction

Mockup.pdf (180.6 KB)

Smart groups are a possibility but hard to maintain. Hereā€™s a completely different approach:

  1. Add a unique tag to each PDF document, e.g. PDF. Really imaginative, I know :slight_smile:
  2. In the sidebar activate the Tags filter (see bottom bar of sidebar)
  3. Select the PDF tag

Now you should only view PDF documents and groups containing PDF documents.

And the Tags filter pane is also available via Tools > Filters.

Would that mean that I would have to tag all 4000 documents individually or would one tag, appropriately worded, applied to the 37000 folders, isolate the folders responding to the description? I donā€™t fancy the first alternative!

Having looked at the database more closely Iā€™ll have to do a lot of tidying up because unfortunately not all relevant folders have the requisite description

Iā€™ll have a look at how tags work

You have to tag only the PDF documents, e.g. search for kind:PDF, select all results, finally use Tools > Batch Processingā€¦ to add the tag.