• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Need Suggestions For appending Date to Filename
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need Suggestions For appending Date to Filename


  • Subject: Re: Need Suggestions For appending Date to Filename
  • From: "Mark J. Reed" <email@hidden>
  • Date: Thu, 5 May 2005 11:43:36 -0400

On 5/5/05, Jack Stewart <email@hidden> wrote:
For many tears I used a file naming protocol which includes suffixing filenames which I create with the current date. I use the format "/YYMMDD" for the date. (Yes, I am aware of the the potential Unix conflict using the "/" character).

Well, you can't have a filename that shows up with a / in the underlying UNIX filesystem, or with a : in Finder, but the OS handles this by swapping them: when a file has  : in its UNIX name, it shows up as a / in Finder, and vice versa.


I have been trying to think of a real simple way to create a keyboard shortcut which I could use to append this date string to any filename which I happen to be typing. I'm not having any great ideas. I think that calling Applescript is probably too slow but maybe I have the blinders on.

Just a thought, but you could run an AppleScript to place the current date into the clipboard - then it's just a command-V away.  This will do the trick - using the UNIX date command may be overkill, but using its formatting capabilities is a lot  easier than putting together the date string with AppleScript's built in stuff.

set the clipboard to (do shell script "date +/%y%m%d")

That's your old format - I would personally use a four-digit year format so that things from 2005 sort after things from 1999, but it's your call.  To get a four-digit year, use %Y instead of %y above.

 There are utilities that let you map keys to arbitrary programs, but I don't think it's a default feature of the OS.  




 

Thanks in advance for your ideas -- JAck
--
Jack Stewart               Mrs Stewarts Piano Lessons
<email@hidden>               <http://www.stewartpiano.com>
--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      ( email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: System Events (was Re: Frontmost)
  • Next by Date: Re: Nice Automator article on O'Reilly
  • Previous by thread: Re: Need Suggestions For appending Date to Filename
  • Next by thread: AppleScript working with Tiger
  • Index(es):
    • Date
    • Thread