User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Applescript Date Formatting Page [1]  
Redtaco4x4
All American
1410 Posts
user info
edit post

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

eraser
All American
6733 Posts
user info
edit post

Would Automator help? (trying to use it to break up some stuff)

12/22/2005 7:06:00 PM

Stein
All American
19842 Posts
user info
edit post

Just use the date command built into the filesystem.

http://www.ss64.com/bash/date.html

Should be the same as the Linux version.

12/22/2005 7:36:52 PM

Redtaco4x4
All American
1410 Posts
user info
edit post

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

1337 b4k4
All American
10033 Posts
user info
edit post

~/Photos/iPhoto\ Library

12/23/2005 10:24:59 PM

 Message Boards » Tech Talk » Applescript Date Formatting Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.