Adding Year and sequential number tag to a Project folder

I have tried to mash together two scripts “Add Prefix” and “Enumerate” with modifications to arrive at something like this “13-001” or just “13001” as a prefix to a folder name (these in fact add the numbers to items contained in the folder, I really want to name the folder only):

Ideally, I’d like to auto generate a tag with that number, so that all folder items have that number associated with them. The reason I want to have a script is I want to make sure that the number isn’t duplicated. I’m using it to track project items.

I have no scripting experience and I’m not having any luck. Does someone have an existing script or could get me heading in the right direction?
Thanks.

Hey, Mindy:

Where is the number coming from ?
Is the series consecutive or does it vary from project to project?

Hi BlueFrog
Each new project will receive a unique number (my hope is to have DevonThink generate the number). So the series is consecutive, the project #s would move up incrementally 13001, 13002, 13003. Next year, I’ll change the first two numbers to 14. That make sense?

Mindy:

This is doable but I’m wondering if it’s killing a fly with a sledgehammer. You could set up a .templatescriptd Template that could generate the folder but it would actually be as simple as selecting Data > New > Group (or Command-Shift-N) and naming it yourself.

If you have “Exclude Groups from Tagging” unchecked in the database properties then adding files to this Group would get the Year-Number tag applied automatically.

It’s still possible so let me know what you think but I wanted to offer you this info.

Jim

I reread your post and I think I still don’t quite understand – I want to auto generate the numbers, I’m not sure how the year number tags would be generated in your scenario? (And you should see the walls in my house!) I have made a folder using the “Enumerate” script, but it only applies the number to the items it contains. My hope is that if I search for a item specifications, or a supplier, or an ink colour, for a specific project I will have quick access to all items associated with that project OR if I’m looking for a particular paper stock I see all projects that used that stock by their job number. The enumerate script adds the number at the end of the folder and numbers incrementally up by one. I wanted to number from 13000 and up. So, to me the shortcomings of just using the enumerate script (in my situation) is that it doesn’t rename its contents and if I was searching for, let’s say, all projects that use a particular type of paper, I would get the results, but not (quickly) know the specific project(s) they belonged to. WIth a tag, the naming of the items wouldn’t be as cluttered in appearance, but more importantly I could search, then click the tag and have all details of a particular project show up. I may have missed what you were trying to tell me, Jim. Sometimes it takes a sledgehammer for me to get it. Thank you!