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


Click here to return to the 'Create timestamped duplicates of files via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create timestamped duplicates of files via AppleScript
Authored by: Andreas. on Sep 29, '08 10:55:36AM
If you want to make the dateStamp a bit 'friendlier' you could append the filename with the output of

on createDateString()
    set theDate to current date
    set the_month to characters 1 thru 3 of (month of theDate as text) as string
    set {the_hour, the_minutes, ampm} to {hours of theDate, minutes of theDate, word -1 of (theDate as text)}
    if the_minutes < 10 then set the_minutes to "0" & the_minutes
    return "" & the_month & " " & day of theDate & "  " & the_hour & "." & the_minutes & ampm
end createDateString
or, say,
set dateStamp to do shell script "/bin/date '+%a %b %e  %H:%M:%S'"


[ Reply to This | # ]