Re: "exists" fooled by "rm"?
Re: "exists" fooled by "rm"?
- Subject: Re: "exists" fooled by "rm"?
- From: "Adam K. Wuellner" <email@hidden>
- Date: Wed, 10 Nov 2004 10:34:41 -0600
On Nov 10, 2004, at 9:57 AM, Craig Knelsen wrote:
When I run it for the first time, itExists is false as expected. The second time I run it, itExists is true as expected. However, if I then remove the file from the temporary items folder using "rm" from a Terminal window and then re-run the script, itExists is true! Why? I am running this script from the script editor.
Don't know why. But, if you have Finder update the tifolder before checking for the existence of the file, it seems to work correctly.
set tifolder to path to temporary items folder
(path to temporary items folder )
-- set fname to (tifolder as string) & "date_check.dat"
& ""
""
(* if not (exists item fname) then
set itExists to false
else
set itExists to true
end if *)
( )
display dialog "fname = " & & & "itExists = " &
open for access write permission
"1 2 3" &
close access
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden