Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Friday, June 12, 2009

Usefulness of a script that creates a random directory, puts it in the clipboard, and types it out

Do you ever find yourself having to frequently create empty throwaway directories on your computer? I do this quite a bit, and found it helpful to write a script to (1) create a directory named after the current timestamp (2) put the directory name in the clipboard (3) type the directory name. I just type randdir`, and it is immediately replaced by something like c:\junk\20090612-104031.

I used AutoHotKey to do this, but it could probably be easily done using Apple Automator or any scripting tool.
::randdir::
FormatTime, JA_DirName,, yyyyMMdd-HHmmss
Clipboard = c:\junk\%JA_DirName%
FileCreateDir, %Clipboard%
Send ^v
return

0 Comments:

Post a Comment

<< Home