Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create a new blank file of any kind with Quicksilver Apps
If you want to create a file of any type in any folder you can do it with Quicksilver. This works great if you find yourself creating the same file type with some data over and over again, i.e. copy a file then rename it). I have been using it a lot lately for data processing by having many Excel templates all ready to paste my raw data into, and for basic HTML pages.

I read about this in this post on Lifehacker this week, so check out the original article for the full details. But here's a short summary:

First put whatever type of file you want to create (Word, Excel, TextEdit, etc.; they can have text in them, too) into ~Library » Application Support » Quicksilver » Templates (create the Templates folder if necessary). Then Select a folder for the new file, and use Quicksilver's Make New » Select Template, and choose the file type you want to create. If you are in a folder and have no files highlighted, you can execute Command Window with Selection (Option-Escape on my machine), and the current folder is selected. After all this you have your new file in the folder of your choice. The initial setup can take sometime, especially if you have lots of templates, but is very handy.

[robg adds: As mentioned in this recent hint, you can also use NuFile or DocumentPalette to do the same if you're not a Quicksilver user.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[9,867 views]  

Create a new blank file of any kind with Quicksilver | 6 comments | Create New Account
Click here to return to the 'Create a new blank file of any kind with Quicksilver' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create a new blank file of any kind with Quicksilver
Authored by: Dragon76 on Mar 30, '07 09:23:44AM

If you're wanting to just create blank files it's probably easier to use the "touch" command in terminal. touch updates a file's modified date to the time you "touch" it but it's more commonly used to create a blank file of the name you are using.

If I use "touch ~/Documents/document.txt" a new file "document.txt" will be created in your Documents folder.



[ Reply to This | # ]
Create a new blank file of any kind with Quicksilver
Authored by: dsjkvf on Mar 30, '07 11:03:42PM

what's unclear for me -- it is the name of the new created file. it will always be untitled.YourExtensionFromTheTemplate, won't it? or is there any way to change ot?



[ Reply to This | # ]
Create a new blank file of any kind with Quicksilver
Authored by: SeattleSeth on Apr 02, '07 12:10:14PM

I don't think you can change the name of the file in the same quicksilver action, but after I create the file it is automatically selected in the Quicksilver Command Window, I assume this is the default mode.

Now, with your untiled.WhateverFileTypeExtension you can use the "rename" command to change the name and with one "invoking" of quicksilver you have a new file personally named.



[ Reply to This | # ]
Create a new blank file of any kind with Quicksilver
Authored by: StrawHousePig on Mar 30, '07 11:30:12PM
I just the other day cooked up something in AppleScript to do this very job.

set doc_list to {"Add new..."}
tell application "Finder"
  if not (exists folder "NewHere" of folder (path to application support from user domain)) then
    display dialog "This is the first time you've run NewHere." & return & return & "Files added to the list are located at" & return & "~/Library/Application Support/NewHere" & return & "Removing a file from this folder removes it from the list."
    make new folder at folder (path to application support from user domain) with properties {name:"NewHere"}
  else
    try
      set doc_list to doc_list & name of every file of folder "NewHere" of folder (path to application support from user domain) as list
    end try
  end if
  set my_file to choose from list doc_list with prompt "Choose a document to place here"
  if result is not false then
    set my_file to item 1 of my_file as string
    if my_file is "Add new..." then
      set new_file to choose file
      duplicate file new_file to folder "NewHere" of folder (path to application support from user domain) with replacing
      set my_name to text returned of (display dialog "Enter a name for the new file." default answer (name of new_file as text))
      my do_it((name of new_file as text), my_name)
    else
      set my_name to text returned of (display dialog "Enter a name for the new file." default answer my_file)
      my do_it(my_file, my_name)
    end if
  end if
end tell

on do_it(my_file, my_name)
  tell application "Finder" to set my_dest to (folder of the front window) as text
  set my_dest to my_dest & my_name as text
  set my_origin to (path to application support from user domain) & "NewHere:" & my_file as text
  do shell script "cp " & quoted form of (POSIX path of my_origin) & " " & quoted form of (POSIX path of my_dest)
  tell application "Finder" to open my_dest as alias
end do_it

Save as an app (which I named NewHere) and drop it in the Finder's toolbar. It has a couple of idiosyncrasies (chiefly replacing without prompting) and could stand some tightening, but it's easy enough to work with and will let you rename the file being duped to the Finder's frontmost window.

[ Reply to This | # ]
Create a new blank file of any kind with Quicksilver
Authored by: StrawHousePig on Mar 30, '07 11:33:41PM

Oh crap... Apologies for stretching the window. :(



[ Reply to This | # ]
no worries
Authored by: robg on Mar 31, '07 05:31:37AM

Fixed :)

-rob.



[ Reply to This | # ]