Re: property of a folder action script
Re: property of a folder action script
- Subject: Re: property of a folder action script
- From: Mr Tea <email@hidden>
- Date: Tue, 11 Sep 2001 22:51:11 +0100
This from IP Indu Pillai (2611) - dated 11/9/01 2.04 pm:
>
> My problem is that I am not able to get the previous value of mydate in
>
> the next execution of the script,
This type of value does not persist from one running of the script to the
next. Also, as 'current date' changes every second, what you need to
identify is 'date string of (current date) to get just the day, month &
year. This information can be stored in the comment field of the folder to
which the action is attached, and checked by the script each time it runs.
on adding folder items to theFolder
set theDate to date string of (current date)
tell application "Finder"
set theFolderDate to comment of theFolder
if theDate = theFolderDate then
--don't create the folders
else
--create the folders
end if
set comment of theFolder to date string of (current date)
end tell
end adding folder items to
Mr Tea
--
Brew of the day: Breakfast Blend
Visit the Tea Room at:
http://homepage.mac.com/mrtea/tearoom.html