Johnny Decimal... and automatic filing?

Does anyone here use the Johnny Decimal filing system, or some variant of it?

Would it be possible to write a script that automatically files if the filename included the decimal? e.g., File “12.03 Secondary May 2022 payroll extract.xls” would get automatically filed to folder “12.03 Payroll 2022” based on “12.03”.

An Applescript should be able to handle this
I use a script to assist in processing Inbox records; it moves the record out of the Inbox
Sample at Moving Inbox Notes to specific folders in my DB - #7 by DTLow
Start coding, and let us know if you run into problems

btw What happens if a record fits multiple categories?
I prefer tags over a folder structure - for example, tag 12.03Finance/Payroll/2022

In Devonthink, tags are also groups (folders)
With tag 12.03Finance/Payroll/2022, we get group/folder 12.03Finance/Payroll/2022

For context, I reflect tags in my naming standard; something like
2022-02-14 Reference [Secondary May 2022 payroll extract] 12.03Finance/Payroll/2022

Thanks for the Johnny Decimal link.
It’s quite informative and I’m revising my organization structure

I’m curious to hear other opinions as well. I started organizing all my files in a customized JD fashion. Though I came across DTP3 during that time, and am currently establishing my DT workflows.

1 Like

It’s not a huge concern for me - having broad categories helps. If it came to it, I could replicate a file in DT into multiple folders - the filename would identify the ‘main’ category.

I do use tags to add detail to a record (e.g., I might add a scripture reference to a document to help with search if it’s not explicitly identified). However, I use documents outside of DT on other devices and there is the (unlikely) possibility I could end up on another operating system in the future. Tags might not be supported by another application or operating system. Folders will.

Thank you so much for this post!! I knew I’d read of some kind of filing system with a generic American name, and I tried all sorts of weird combinations (Paul Decimal, Barry Decimal, etc.) and I never found it. It was this!!

Because I couldn’t find what I’d once read about, I implemented a numerical system from what I could remember, which actually seems vaguely similar (thanks brain).

I use:
10. Apples
20. Pears
30. Oranges
40. Grapes
Etc. (I actually only have 4 top level folders but I have space for 9 in this system).

Then within those top folders, I did the same again:
10.01. Granny Smith
10.02. Red Falstaff
10.03. Cox
10.04. Pippin

That’s as far as my system goes.

I have noticed myself now thinking “this file goes in 10.02.” Which is either amusing or stupid and I should’ve used Dewey decimal or something so it actually meant something to someone other than me :roll_eyes:

Looks good… and you shouldn’t have a problem finding fruit. :slight_smile:

Also found this, which feels like a hybrid of folders and tagging - but including ‘secondary categories’ in the filename. How to Organize Your Files: An Introduction to Personal File Management - The Mac Observer The author suggests a numerical system could work too, which makes sense. Again, hopefully I could automate filing with DT. I’m not sure what the benefit of separating by file type, except perhaps for tidyness.

In my (vaguely similar) system this isn’t a problem. My top level folders (“groups” :grimacing:) use relatively immutable categories for my fields of interest (I crossed checked it with the Dewey list to make sure I was choosing top level and not just what I felt was top level, so “earth sciences” instead of “geology”). I have subfolders inside them that are more defined, so eg I’d have:

  1. Earth Sciences
    10.01. Geology
    10.02. Climate science
    10.03. Ecology
    10.04. Specific niche interest 1
    10.05. Specific niche interest 2

Etc. If something fits in more than one subfolder (fairly common in earth sciences!), I just put it in the top folder and not one of the subfolders. So if something is both geology and climate science, it might just end up in the “10. Earth Sciences” folder rather than being subcategorised. Hopefully that makes sense.

I don’t file my bills in DT, but I guess if I was doing similar for that I’d have:

  1. Bills
    20.01. House
    20.02. Car
    20.03. Tech

Or whatever, and all the misc ones would just go in “20. Bills”.

Edited as I realised an error with my numbering.

I just completed a project using Smart Rules that could use some of the same principles to achieve what you have in mind. My goal was to find a way to rename documents within DT3 using the automation feature within Smart Rules and it worked very well. I used the “Scan Name” function which uses the AppleScript’s Regular Expression syntax for identifying and selecting digits. Once I had parsed the existing name, I was then able to rename the document title to my liking, retaining the existing text in the name but assigning a preferred date convention at the front of the name (yyyy-mm-dd, vs. my existing conventions of yyyymmdd or mmddyy). In your case, your next action in your Smart Rule would be to search for the group with the digits you’re looking for and then filing the document automatically. If you’re interested, I can point you to the part of the documentation that describes this approach.

1 Like

Could someone give details on this
My regex skills are poor (none)
I use plain applescript code; it’s do-able but more complex
. passing through the characters looking for “.” and confirming nn.nn

I’m posting a link to a DT Community post that proved very helpful to me to learn what I needed to write Smart Rules that I used to edit and replace document names in my database. Take a look. Smart Rule wildcards - #16 by chrillek
Note: chrillek’s post contains a clip from the documentation that includes a link to the Regular Expression syntax table.

1 Like

For illustration purposes, I will describe for you the process of writing a Smart Rule that automated the renaming of document names in a clearer format. Specifically, for several years I used the following date convention to name my files imported into DT3: “YYYYMMDD Document Name”. For better clarity, I wanted to “batch rename” documents with this convention to read “YYYY-MM-DD Document Name”. Of course, I could manually edit these names, but why do that if automation within DT could do the trick. I wrote the following Smart Rule, to be applied “on demand” once I had the folder (or group of folders) I wanted set properly in the Smart Rule:

The Action “Scan Name” looks for a “Regular Expression” with the syntax shown, where:

  1. (\d{4}) represents the first four digits in the document name (the “year” string_
  2. (\d\d) represents digits 5 and 6 (the “month” string")
  3. (\d\d) represents digits 7 and 8 (the “day” string")
  4. (.*) represents the text string (in this case, “Document Name”)
    The next action is “Change Name” that interprets and reassembles the expression that was parsed in the previous action by using the following syntax:
  5. \1 refers to the first bracketed group (\d{4}) and places a “-” between each of the next groups of digits (\2 and \3), followed by a space and then the preserved text string (\4).

After creating this Smart Rule, I proceeded to make 4 additional ones to deal with other past conventions such as:
“MMDDYY Document Name”
“Document Name MMDDYY”
and so forth.

Make Sense?

2 Likes

This site was recommended on one of the older posts on this forum and is a really good regex primer: http://rexegg.com.

1 Like

That is a deeeeep dive but a great resource. Nice to see it mentioned.

1 Like

Just to clarify: There’s no such thing as “AppleScript Regular Expression syntax” – AS has not even the faintest notion of REs. What’s used here is the ICU RE syntax.

In addition to rexegg, I’d like to mention regex101.com It is not a learning resource but a great tool to check your REs against your text. And then there’s of course Jeffrey Friedls book on REs. Incredibly helpful, but maybe not the best starting point.

2 Likes

Many thanks for the ideas, particularly around the use of regex.

I’ve tried this, and was able to create a smart rule to automatically file based on a leading category in a file name e.g., “[Test][Technical] My test file.docx” was instantly filed to folder [Test]/2022.

Good so far, but then I realised [ ] are special characters in DT, so searching for [Technical] in a file name doesn’t return meaningful results (it works great at finder level). So I either find another character, or go with JD numbering - but I think that would require AppleScript (to translate 10.02 into 10.02 Accounting Files by finding the matching folder, which I’d have to find time to learn.