Automatic sequential numbering in document names possible?

Hi all,

I am doing a deep dive in DevonThink and thinking hard about the right approach to build a database. It seems that ‘grouping’ is my way to go. I’ve seen that some people build it up in areas (10.), categories (10.1) and subcategories (10.1.1). They build it up with numbers to get a good filing system.

This seems very neat to me. Though - I am thinking about scalability. My database is very small at the moment. But what if I have a database with documents listed 10.1.1, 10.1.2, 10.1.3, 10.1.4 etc and after a while I add a new document which needs to have number 10.1.2 as it is really closely related to document 10.1.1 and 10.1.3.

This will become a problem then. Because either (i) I need to rename the numbering of all documents as this is not numerically in the right order (as in the example the original 10.1.2 becomes 10.1.3. due to the new addition of the document, but then the original 10.1.3. will need to become 10.1.4 etc.), (ii) if I don’t renumber, after a while the document numbering system become random anyway as there is no logic behind the numbering anymore besides the numbering itself, because the close relationship between documents filed after each other will be gone.

My question is - is there some sort of automation built in in DevonThink which can handle the (automatic) renaming once such problem occurs? Please note that if it’s an Applescript that I probably won’t be able to do this as I have no idea how those work.

Please see attached screenshot for some additional clarity regarding the numbering :slight_smile:

Any help is greatly appreciated!

No, there is no such mechanism built-in. It would likely require scripting to accomplish. However, I would not pursue this because it sounds neat. I would only do this if it makes sense to how you think. And I would not think about automating it until you’ve manually worked out the process.

Thanks Jim - much appreciated as always. It seems that I get into some sort of analysis paralysis for the right way to sort my Databases, constantly researching new methods/techniques, and then questions all the pros and cons of it (focusing on the cons involuntarily) and thus effectively getting nowhere :slight_smile:

1 Like

You’re welcome and it’s good to be open and flexible. Such a system is interesting but, like Zettelkasten, it doesn’t suit everyone (myself included) :slight_smile:

I’m not enthused with a numbering system
but instead of single digit numbers, try 2 or 3 digits
for example 010.010.010, 010.010.020, 010.010.030
Also, incrementing by 10 leaves room to insert documents

1 Like

Out of curiosity - what’s your preferred system? Folders, tags, linking?

I group mostly but generally very shallowly.


Tags mostly
Some linking
Groups if I have a small collection of records


I get the same. I have to say with DEVONthink 3 for me the whole point is that I DON’T have to do complicated grouping systems and naming conventions. It is easier just to use the excellent search and OCR and so on. Tags too, recents and so on and some smart groups also help a lot. I also use Houdah Spot.
However I have found my own notes system quite good and I put a code and yyyy-mm-dd date into the title which I can then order ‘by name’.
Nothing else ever worked for me, it was why I went onto DEVONthink 3 in the first place. My own notes system frankly is, though it works and I like it, is pretty much redundant.


Mine is neither efficient nor neat. I don’t know if it is redundant, but my mix of sorting and file names seems to work for me (two methods of tracking down things).

I index a folder on my hard drive that is for confidential / sensitive material and index a folder in Dropbox for everything else. Hazel sorts things into folders with broad categories (“research journal” or “research project blah blah blah”) primarily based on keywords in the name of the file. I rarely have more than a sub directory or two within those categories, so shallow organization.

Most things I create (txt, md, word, etc.) have names beginning with yyyymmdd (20230624). Each file has a unique identifying name this way — in rare cases when the keywords match I’ll add a time stamp (20230624T2300). This might solve the OP’s problem. Searches using DT or EasyFind (a DT product) usually turn up anything I need before I have to go hunting around in the groups / folders.

I have been experimenting with other organizational schemes for a long time, but a couple of decades into this system and I haven’t found a viable alternative (for my workflow). Your mileage may vary. A big drawback to my approach is the lack of replicants. I use the wikilinks, but replicants would be really helpful. Unfortunately, in my experience, it is unwise to mix replicants and indexing.

1 Like

You might find this useful:

Welcome @AutonomyGaps

Are you actually using Johnny Decimal?


It’s indeed what I looked into. Though it seems to static for me now I fiddled around with it. I am concerned that if I invest in this system and I want to switch some folders or categories - it will be impossible after a while because then the whole system is upside down.

In law textbooks looseleaf subscriptions, it is usual for the publishers to number paragraphs, for example, 23.01, or 23-01. Update revisions that require a new paragraph might be 23.01.1 (or 23-01.01)

Applied to your question - " But what if I have a database with documents listed 10.1.1, 10.1.2, 10.1.3, 10.1.4 etc and after a while I add a new document which needs to have number 10.1.2 as it is really closely related to document 10.1.1 and 10.1.3." - the answer would be

Unless you seriously expect so many new documents to be closely related and are therefore concerned about the readability of etc, I’d have thought that for scalability 10.1.1, 10.1.2 etc the easiest in the long run.

For my law library, I use Airtable for the bulk of the entries. To avoid numbering becoming unreadable at a glance, I have more than one column. For example, prefix 10.1 in the first column, .1.1 in the second column, and so on. I can then sort the columns combined.

I think the forum is doing a good job putting you off this idea, but I don’t know why you’d want that anyway :grimacing: Let’s assume there’s only one reason for naming your files: So the human can read the file names.

If you want the files numbered for the human driver, having DT automatically rename them without your knowledge would render naming them fairly useless. You’d think you want file 10.03 and then one day DT would rename it (without your knowledge in this automated scenario) and now you would go to use said file and it wouldn’t be there any more. It’s now 10.04, or 10.05, or….

For what it’s worth, I use number prefixes for my groups, sub groups, sub-sub groups, etc. (I have a vague rule that I don’t have folders that go more than 4 tiers deep). This is because I want my groups sorted the way I want them and using numbers allows me to sort them the way I want them. My group structure doesn’t change much. And if it does, I make a decision to do that and do it carefully (I’ve done one big restructure of a subgroup so far). My actual files are named via a few different conventions, mostly depending on what type of file it is.