• 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: Create a folder with today's date as the folder name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Create a folder with today's date as the folder name


  • Subject: Re: Create a folder with today's date as the folder name
  • From: Gnarlodious <email@hidden>
  • Date: Sat, 09 Feb 2002 14:18:14 -0700

Entity email@hidden spoke thus:

> I am able to script to create a new folder but do not know how to tell it to
> insert today's date !!
We were just discussing this to death, everyone is tired of it.
Here is what I use, it changes the name of a folder dropped on it to today's
date:

on open dropped
set theDay to day of (current date)
if theDay < 10 then set theDay to "0" & theDay
set theMonth to my GetMonthNumber()
if theMonth < 10 then set theMonth to "0" & theMonth
set theYear to year of (current date)
set theFolderName to "" & theDay & "-" & theMonth & "-" & theYear

try
tell application "Finder"
set name of folder (dropped as alias) to theFolderName
end tell
end try
end open

on GetMonthNumber()
set theDate to (current date)
copy theDate to b
set the month of b to January
return 1 + (theDate - b + 1314864) div 2629728
end GetMonthNumber


This is a "droplet", save the script as "application". It will not run in
your editor window. To edit the script drop it on your Editor's icon.
That should get you going.

Rachel http://www.gnarlodious.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Create a folder with today's date as the folder name (From: "email@hidden" <email@hidden>)

  • Prev by Date: Create a folder with today's date as the folder name
  • Next by Date: Re: How to get info on number of monitors?
  • Previous by thread: Create a folder with today's date as the folder name
  • Next by thread: Re: Create a folder with today's date as the folder name
  • Index(es):
    • Date
    • Thread