I’ve got a set of 27 files that I want to move into a single group within a DTP database. I want to rename each file with the word “Lesson” and a number: Lesson 01, Lesson 02, etc.
Each file currently has a unique but meaningless filename, like dfbff151-69b9-46dd-ac51-5b1f73b06c3b.pdf.
The numbered sequence should reflect the creation date and time of the item. In other words, Lesson 01 was created before Lesson 02, etc.
Is there a way to make this happen in DTP, or do I need to change the file names manually, either before or after they’re transferred to DTP?
Alternatively, you could use Counter which would prefix with up to five zeroes.
On a side note, the number of zeroes used in a Counter can be set with the CounterDigits setting in Appendix > Hidden Preferences section of the built-in Help and manual. This is set via a Terminal command, per the instructions at the top of the page.
That did it, Bluefrog. Thank you. That’s a technique I’ll be using fairly often.
chillek, I was enjoying experimenting with the script you kindly wrote. I’m putting it in a safe place so that when I’m in a position to advance my nearly non-existent knowledge of rudimentary scripting, I’ll have something to work with.
Both of you gave me deeper insight into the power of DEVONthink. So cool!
That doesn’t help for files imported into DT. It’s perhaps possible, but already selecting those files is probably very tedious. And one shouldn’t fiddle with database internals with Finder, anyway.
While that is technically true, that operation should only be done with indexed files or before they’re imported into DEVONthink. As @chrillek mentioned, you should not be messing about in the internals of a database, if that’s what you were thinking of.
Look for an app called File Mangler on the App Store. It will allow files to be renamed in a number of different ways before they are imported to DT Pro.