• 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
Syntax for Finder 'exists' command?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Syntax for Finder 'exists' command?


  • Subject: Syntax for Finder 'exists' command?
  • From: Dennis Jones <email@hidden>
  • Date: Tue, 29 Mar 2005 06:56:29 -0800

I am trying to determine if a file exists after a Finder 'move'
command prior to using the file.

In the code below, line 1 and 2 work as expected to get the info for
the file. Line 3 works as expected and selects the file in the finder.

However, line 4 always returns 'false', when I would expect it to
return true since I know the file exists.

What is wrong with my syntax?

--
Dennis Jones
email@hidden

-- code
set importFolder to "fooFolder"
set importFile to "fooFile"
tell application "Finder"
	set this_item to (importFolder & importFile) as alias  -- line 1
	set this_info to info for this_item  -- line 2
	select (importFolder & importFile)  -- line 3
	exists (importFolder & importFile) as alias  -- line 4
end tell
 _______________________________________________
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

  • Follow-Ups:
    • Re: Syntax for Finder 'exists' command?
      • From: "Wallace, William" <email@hidden>
  • Prev by Date: Keychain and text returned
  • Next by Date: RE: Applescript-users Digest, Vol 2, Issue 203
  • Previous by thread: Re: Keychain and text returned
  • Next by thread: Re: Syntax for Finder 'exists' command?
  • Index(es):
    • Date
    • Thread