• 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
Finder and the time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Finder and the time


  • Subject: Finder and the time
  • From: Ken Dobson <email@hidden>
  • Date: Sat, 17 Mar 2001 23:48:33 -0500

I found this to be both interesting and confusing.

get time string of (current date)
--> "11:33:32 PM"


Simple enough right?

However,

set serial_num to time string of (current date)
tell application "Finder"
if not (exists (folder serial_num of desktop)) then
set the new_folder to make new folder at desktop ,
with properties ,
{name:serial_num, label index:6}
end if
open new_folder
end tell


Creates this --> folder "01 PM" of application "Finder"

I assume this to be the seconds only of the current time, as running the
script a few times returns folders named "01","12","23"...

Furthermore,

set serial_num to (current date)
tell application "Finder"
if not (exists (folder serial_num of desktop)) then
set the new_folder to make new folder at desktop ,
with properties ,
{name:serial_num, label index:6}
end if
open new_folder
end tell

Fails entirely!
Is this because the Finder won't allow the ":" character in a folder or file
name? Why then does the time string routine parse just the second to the
folder name?


  • Follow-Ups:
    • Re: Finder and the time
      • From: "Christopher C. Stone" <email@hidden>
  • Prev by Date: define my own finder keyboard shortcuts?
  • Next by Date: Text Item Delimiter error
  • Previous by thread: Re: define my own finder keyboard shortcuts?
  • Next by thread: Re: Finder and the time
  • Index(es):
    • Date
    • Thread