Check if file exists

Hey everyone,
i’m sure this one is extremely easy . How do you make an apple script command that checks if a file exists, and if it doesn’t do an action. For example this is what i got so far.
Tell finder
If “macintosh hd:Libary:prefFile” exists
beep
end if

I not sure on how to word to see if the file doesn’t exist.

Yes, it 's quite easy :

tell app “Finder”
if file “Macintosh HD:Library:prefFile” exists then
beep --if your file exists
else
beep 2 --if your file doesn’t exists
end if
end tell

SHoot thanks,
I just figured it out here’s my script
set username to the second word of (characters (offset of “Users” in path to ¬
preferences as string) through (length of (path to preferences as string)) of ¬
(path to preferences as string) as string)
tell application “Finder”
if file “filenamehere” of folder “Preferences” of folder “Library” of folder username of folder “Users” of startup disk exists then
select file “Appnamehere” of folder “Appfolder” of folder “Applications” of startup disk
open selection
else
select file “filenamehere” of folder “Preferences” of folder “Library” of startup disk
copy selection to folder “Preferences” of folder “Library” of folder username of folder “Users” of startup disk
select file “Appnamehere” of folder “filenamehere” of folder “Applications” of startup disk
open selection
end if
end tell