Just for grins, I'm writing some applescript code to tar specified directories and save them to a location for backing up purposes. I want to append the date onto the filename, but using the "current date" command gives me too long of a date format. I'm looking for a format similar to 12/22/05 or something without spaces. If I'm backing up my iPhoto Library, I want the filename to be "iPhotoLibrary_backup_12/22/05.tar". I've been googling and can't seem to find what I want. Can I use the "current date" command and send that to another script to parse it out and return it in the format I want? Any other ideas?
12/22/2005 7:02:58 PM
Would Automator help? (trying to use it to break up some stuff)
12/22/2005 7:06:00 PM
Just use the date command built into the filesystem.http://www.ss64.com/bash/date.htmlShould be the same as the Linux version.
12/22/2005 7:36:52 PM
that worked! Thanks! How do I deal with sending spaces to the command line? It errors out whenever there is a space in a directory name, like "iPhoto Library".
12/23/2005 5:33:02 PM
~/Photos/iPhoto\ Library
12/23/2005 10:24:59 PM