Skip to content

Going Paperless: File Naming with TextExpander

TextExpander Logo

Now that I have figured out my file naming convention I can get to one of my favourite parts: Making things EASY.

Easy means to me: No need to think and still get the perfect result. One way to achieve this is muscle memory. Can you remember the times when you right-klicked with your mouse to open a context menu, selected the copy entry and… Well – didn’t cmd-c / cmd-v feel sooo much better? With TextExpander I can build the same kind of muscle memory for standardised text snippets. Applying this to file naming standards is only logical.

Here’s my file naming convention again (if you wonder why it looks that way, read here):

TYPE – YYYYMM – Description (explanatory word) – A00.pdf

(The versioning part at the end shall be optional.)

I’m not going to explain TextExpander as an application because Don McAllister has already covered it in several of his excellent screencasts. What I’ll do instead is just explain how I practically use TextExpander to name files in a consistent way without thinking (too much).

I found there are mainly 2 ways of using TextExpander for this.

Option 1: The 4 Single Snippets

Build 4 single snippets covering the 4 parts of the file name. Seemed obvious – but didn’t feel fluent enough when I actually handled it. No worries, there’s a better way:

Option 2: My File Naming Monster Snippet

I built a single snippet that covers the entire file name for every type of file and every variant (versioning / no versioning, etc.) following my naming convention. Here we go:

%fillpopup:name=TYPE:default=ARTWORK:CONTRACT:CORRESPONDENCE:DOCUMENT:INVOICE:ORDER:RECEIPT:REFERENCE% – %Y%m – %filltext:name=Who What (detail):width=30%

Looks terrible, right? That’s why I call it Monster – and I love it. I tell you what: Go into TextExpander on your Mac, add a new snippet, just copy and paste the string above and give it a try. Here’s how it would look for scanned masterpiece drawings of my daughter if she could handle crayons already other than trying to eat them ;-)

You see the first part of the snippet – %fillpopup:name=TYPE:default=ARTWORK:(…) – creates the dropdown menu with all the entries for each of the document types I think I’ll have in my paperless system. If I’ choose these so that they start with different characters, I can even select them with just pressing that character instead of arrowing down… Creating flow…

The second part – %Y%m – inserts the current year and month in a sorting-friendly manner.

The third part – %filltext:name=Who What (detail):width=30% – gives me a 1 line text entry field that is 30 characters wide. Because I named that field “Who What (detail)” the snippet reminds me of the convention that I have chosen for this descriptive part of the file name. This will help me get a bit of systematic even into the free text field. Yes, it’s taken me a while to accept myself as just being that way…

I can manoeuvre through the snippet using the TAB key and apply my input hitting RETURN.

Ah – the versioning part!

Version numbers can be really helpful. Depending on the software I use and the circumstances. But – I don’t need version numbers on every file. TextExpander does support optional texts. But – honestly – looking at a 3 digit thing that I need rather rarely – I decided to not overdo it.

I found that’s a good decision because: Once I hit return after entering the file name description part, TextExpander applies my input to the file name and takes me back into the Finder – AND – the file name remains in modification mode with the cursor nicely positioned at the end of the file name. Perfect because now I can simply add a document version when I need it or just hit another RETURN if I don’t.

The date thing

I know I’ll sometimes come across a file that will be a month old before I pick it up from my action folder and name it properly. Maybe even two months – hopefully in rare occasions. More often might I want not only the year and month but also a day to be included in the file name – the artwork example above would be such a critical case…

There’s a better way to handle this than manually going into the filename after creating it, arrowing towards the date stamp and then correcting / adding numbers. I simply duplicated the TextExpander snippet in my library, changed the date stamp to my anticipated requirements and saved each snippet to a slightly amended shortcut.

Here are the ones that I use:

-fn    =   the “standard” file name snippet as shown above

-fn1  =  with date stamp corrected by subtracting 1 month  :  replace date part with %Y%@-1M%m

-fn2  =  with date stamp corrected by subtracting 2 months  :  replace date part with %Y%@-2M%m

-fnd  =  with date stamp including a 2-digit day  :   amend the original date part with %d

That’s it. My file naming convention realised with TextExpander. Another reason why the maker of that fine piece of code (Smile Software) in my eyes has earned every right to lead their company name :-)

So what’s next in my paperless project? I guess I want to play with Hazel. Just as good.

Stay tuned.

7 Comments Post a comment
  1. The reason for starting all these snippets with a dash is that I use really a lot of snippets in different scenarios. Another one is OmniFocus as my digital GTD brain. Yet another one is of course all sorts of shortcuts for web addresses, ID numbers, etc. Because I have so many snippets there is a risk of the shortcuts conflicting and hence becoming longer. I avoid that by putting different characters in front of the mentioned subsets of my snippets. Everything around file management has a dash.

    30. November 2012
  2. Great post.
    I tried this but get an error from the Finder when I try to rename a file (as opposed to opening the file and re-saving it).
    The error is:
    You can’t use a name that begins with a dot “.”, because these names are reserved for the system. Please choose another name.

    Seems like the Finder is trying to save the filename as just .ext (the dot and extension) at the moment that the TextExpander dialog pops up.
    Has anyone run into this? Any suggestions? Thanks!

    1. February 2013
    • Thanks Elliot! I don’t have a Mac at hand right now but my guess is: After you hit return once to apply the snippet be sure to hit another return to actually apply the file name change.
      Does that help?
      Chris

      (If you hit esc or tab or arrow down etc the new file name does not get applied and the “name” will only contain the separation dot and the extension. Hence OS-X will think the file starts with a dot (=system file) and ask you as described.)

      3. February 2013
      • I have this issue too. If I have a snippet that prompts for a text string, the focus moves from the filename field in finder to the textexpander popup, apparently leaving finder with a file called .pdf (or whatever). Then finder complains as johnsel describes above.

        If I try a partial custom field in textexpander, the focus still moves from the filename field and the substitution fails – but with out the finder error.

        I’m still looking for workaround (or maybe the right way to do it in the first place.)

        2. June 2013
      • As far as I can see, the reduction of the file name to “.pdf” is temporary while the focus is moved to the TextExpander snippet. After you’ve done your selections and inputs there and completed with hitting the return key (NOT esc), those changes get applied to the file name while still marking the name as changable. So you have to strike a last return to close the changes. If that does not work for you I assume it’s either in the settings of TE (unlikely) or how you’ve set your Mac’s system preferences to handle moving from entry field to entry field.

        19. June 2013
  3. Great post!

    10. April 2013
  4. This tip and TE snippet are very helpful; many thanks! Here are some links to articles that suggest alternative and complimentary approaches including, e.g., project names (http://blog.macademic.org/2011/03/31/taking-notes/), category codes (http://macsparky.com/blog/2011/3/15/notational-velocity-naming-conventions.html), and some other document types that I will blend with your snippet (http://bettermess.com/naming-files-and-avoiding-folders/).

    8. June 2013

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: