gSkinner - Home

Create File from Template in OSX with Right Click

Posted on March 12, 2006 by Grant Skinner

There have been a few occasions when I envied Windows users’ ability to create a new empty file within explorer by simply right clicking. Why can’t we do this in the Finder on Mac OSX?

Browsing the forums on MacNN, I encountered this post on the issue, which spurred me to apply my limited AppleScript knowledge (mainly gained while trying to create my flCompile workflow) to create a solution. The result is the “QuickFiles” Automator workflow (aka context menu extension), which takes it one step better than Windows by letting you define template files.

To use QuickFiles, simply open the folder that you wish to copy a template into. Right click in the finder window (or on a file in the window), and select “QuickFiles” from the “Automator” menu. Select the template you wish to copy using the mouse or keyboard (arrow keys, or type the first few letters of its name), and click ok (or press enter). The template will be copied into the folder and selected. Hit enter to rename the file, or cmd-O to open it.

The list of file templates is controlled by placing template files in a “QuickFiles Templates” folder in your Library. Read the Read Me for full information.

Disclaimer

I take absolutely no responsibility for any problems you experience or damages (direct or indirect, including but not limited to loss of data) caused by using these workflows. I have tried my best to make sure they are totally safe, but I am not an AppleScript expert or a command line guru. Use at your own risk.


IMPORTANT NOTE

This version of QuickFiles does not work with OSX 10.6. I have released a vastly improved version of QuickFiles which you can read about and download here.


You can download this handy extension by clicking here. Be sure to read the supplied Read Me for installation and usage instructions.

Follow @gskinner on Twitter for more news and views on interactive media.
8 Comments

Hi,

THANK TOU SO MUCH!

This is so wonderful, I don't know how to thank you. I wish I knew actionscript, but I am just getting started. This workflow you came up is so useful,and I would really like to thank you for taking the time to create it, and as well as sharing it.

Thanks,

John

Posted by: John Barrett on Mar 13, 2006 1:54am URL: http://www.johnbarrett.net/blog/

There is also this: http://www.growlichat.com/NuFile.php

Posted by: Aaron on Mar 13, 2006 10:06am

Someone did it before ;)

http://www.growlichat.com/NuFile.php

Posted by: freddy on Mar 13, 2006 10:06am

Yes, I'm aware of NuFile. This was largely an exercise in AppleScript. Still, it has benefits over NuFile such as managing a longer list of templates more effectively, and allowing you to navigate the list with the keyboard (selecting by typing the first few characters is especially handy for me). Conversely, some people will find NuFile's submenu more useful. Options are always a good thing imho (especially free options).

Posted by: Grant Skinner on Mar 13, 2006 11:20am URL: http://gskinner.com/

Keep up good job :). Yep, more choices is better for everyone.

Posted by: Tee on Mar 13, 2006 9:02pm URL: http://www.growlichat.com/NuFile.php

Hey, nice job but you forgot the case where there are no finder windows open (sometimes you just want a quick file to the desktop... Here's the change for your AppleScript:

tell application "Finder"

try

set filePath to (folder of the front window as string)

on error what

set filePath to (path to desktop folder as string)

end try

end tell

set fileDir to getDirectory(filePath)

Thanks again for the cool workflow.

Posted by: Seth on Mar 14, 2006 1:25am

My God!

Good job!

thanks a lot! Now I can create my class files more easily...

thanks!

Posted by: Alain on Mar 21, 2006 7:51pm URL: http://www.coefficient.ca/

I like your solution very much, but I have to second NuFile too

Posted by: Juan Frias on Apr 6, 2006 8:27pm URL: http://www.corvidwebsolutions.com/

Leave a Reply

Your email is never published nor shared.




You may use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">