Skip to main content
added 389 characters in body
Source Link
adayzdone
  • 1.9k
  • 11
  • 11

You need to reference a file for the test to function properly.

set thePath to path to application support folder from user domain
tell application "System Events" to exists file ((thePath as text) & "Test.file")

With the conditional:

set thePath to path to application support folder from user domain
tell application "System Events" to exists file ((thePath as text) & "Test.file")
if the result then
    display dialog "The file was found!" buttons {"OK"} default button 1
else
    display dialog "The was file wasn't found." buttons {"OK"} default button 1
end if

You need to reference a file for the test to function properly.

set thePath to path to application support folder from user domain
tell application "System Events" to exists file ((thePath as text) & "Test.file")

You need to reference a file for the test to function properly.

set thePath to path to application support folder from user domain
tell application "System Events" to exists file ((thePath as text) & "Test.file")

With the conditional:

set thePath to path to application support folder from user domain
tell application "System Events" to exists file ((thePath as text) & "Test.file")
if the result then
    display dialog "The file was found!" buttons {"OK"} default button 1
else
    display dialog "The was file wasn't found." buttons {"OK"} default button 1
end if
Source Link
adayzdone
  • 1.9k
  • 11
  • 11

You need to reference a file for the test to function properly.

set thePath to path to application support folder from user domain
tell application "System Events" to exists file ((thePath as text) & "Test.file")