• 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: "exists" fooled by "rm"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >"exists" fooled by "rm"? (From: Craig Knelsen <email@hidden>)

  • Prev by Date: Re: "exists" fooled by "rm"?
  • Next by Date: Re: Read a cell in Excel 2004
  • Previous by thread: Re: "exists" fooled by "rm"?
  • Next by thread: Simple Help Files
  • Index(es):
    • Date
    • Thread