Sunday, November 15, 2009

Mac OS X: automator: create a new file

In a Windows OS, it is really simple to create a new text file: right-click > New > Text file.

On my dear Macbook Pro, it is still not out-of-the-box.
Hopefully Automator is here to fill the gap.Please note that this method does not require additional software. Only standard Mac OS X components are used.

First let's have a look at the final result:

1/ Right click on the folder in which you want to create a new file, and select "New file"


2/ Type the name of the file. For example: New file.txt or New file.docx



3/ The file is automatically created inside the folder we specified before and after opened in your favorite editor.




Now let's integrate this to your Mac OS X system.

- First method. the easy one:
- download the automator workflow. It is stored on my skydrive: Mac OS X Create a new file
- install it on your mac: put this file into the ~/Library/Services/ folder
- open it. (it will be opened within Automator)
- Press Cmd+S or click File > Save to register it within the Contextual menu
- Close automator

- Second method. Create an automator workflow according to these instructions:
- Launch Automator.app located in the Applications folder.
- Create a new Service


- File > Save or Cmd + S

- Here is an overview of the workflow:



As you can see:
- this Service Workflow receives Folder as input and is only available in Finder
- we will also need 2 variables: "Filename" and "Path"

Here is the detail of the workflow:
- Once this is done, just press Cmd + S to save it and register this service within the Finder.app


Enjoy this new file creation!

No comments:

Post a Comment