check to see if volume exist

i do not know if its because its friday or what but i am going nuts trying to figure this out

i am sure this is a simple one

i want to do this

tell app “finder”
if exist volume “myVolumeName” then
– do something
else
mount volume “smb://username:password@myVolumename/share”
–do something
end
end

what am i forgetting or doing wrong?

Hi :slight_smile:
Maybe use “disk” in place of “volume” :

if exists disk “myVolumeName” then …

thanks knew it was simple

One more tip from our FAQ (also valid for volumes):

http://macscripter.net/faq/comments.php?id=138_0_10_0_C

That’s my favorite way to check. :slight_smile:

– Rob