• 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: Renaming a folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Renaming a folder


  • Subject: Re: Renaming a folder
  • From: Mr Tea <email@hidden>
  • Date: Tue, 09 Oct 2001 09:04:16 +0100

This from Craig Walsh - dated 5/10/01 5.05 am:

> I was just wondering if anyone knows how to rename a folder to
> the current date of the machine.

I use a pop-up folder that is named with the current date in the format
DD-MM-YYYY. A scheduling utility (T-Minus 10) runs an applescript that
changes the name of the folder at midnight daily. Here's the pertinent part
of the script.

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 1 of alias "Hartside!:Unfiled:" to theFolderName
end tell
end try

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

I can't remember who posted the GetMonthNumber handler, but its not mine,
sorry to say.

Mr Tea

--
Brew of the day: Ceylon

Visit the Tea Room at:
http://homepage.mac.com/mrtea/tearoom.html


References: 
 >Renaming a folder (From: Craig Walsh <email@hidden>)

  • Prev by Date: Re: Renaming a folder
  • Next by Date: Aliases
  • Previous by thread: Re: Renaming a folder
  • Next by thread: Renaming a folder
  • Index(es):
    • Date
    • Thread