Finder and the time
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?