Hi my friends.
it says always, there is not file. Please help me
tell application "Finder"
set MyName to do shell script "whoami"
if {exists POSIX file "/Users/" & MyName & "/Library/Preferences/pbs.plist"} then
try
display dialog "File Exist" buttons {"OK"} default button 1 with title "Test1" with icon 0
end try
else
display dialog "File Not Exist" buttons {"OK"} default button 1 with title "Test1" with icon 0
end if
end tell
it says always, there is not file. Please help me
tell application "Finder"
set MyName to do shell script "whoami"
if {exists POSIX file "/Users/" & MyName & "/Library/Preferences/pbs.plist"} then
try
display dialog "File Exist" buttons {"OK"} default button 1 with title "Test1" with icon 0
end try
else
display dialog "File Not Exist" buttons {"OK"} default button 1 with title "Test1" with icon 0
end if
end tell