• 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: Set Current date to new folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Set Current date to new folder


  • Subject: Re: Set Current date to new folder
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 14 Jan 2001 23:25:34 -0800

On 1/14/01 8:34 PM, Joe Calabria <email@hidden> wrote:

>I want to create a new folder and name it the current date in the following
>format: 1/15/01
>
>I need to fill in the ???????:
>
>tell application "Finder"
> activate
> make new folder at desktop
> select folder "untitled folder"
> set name of selection to ???????
>end tell

Try this:

tell application "Finder" to make new folder at desktop with properties
{name:(date string of (current date))}

This will give the full date in whatever format you have dates set to in
the date and time control panel. you'll have to extract the information
you need from the date string to get the format you want.

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | Hard as it may be to believe, my |
| email@hidden | life has been based on a true story. |
----------------------------------------------------------------------


  • Prev by Date: Set Current date to new folder
  • Next by Date: Re: Set Current date to new folder
  • Previous by thread: Re: Set Current date to new folder
  • Next by thread: Re: Set Current date to new folder
  • Index(es):
    • Date
    • Thread