2010/2/6 zryip theSlug <zryip.thes...@gmail.com>: > Hi Dan, > > To resolve your problem you could use a try statement like this: > > set myVolume to "/Volumes/George" > try > do shell script "ls " & myVolume > -- check if the volume /Volumes/George exists. If the volume > doesn't exists an error occurs > set myVolume to myVolume > on error > set myVolume to myVolume & "-1" > -- if the try statement failed then the volume must be /Volumes/George-1 > end try > > set myDocument to myVolume & "Textfile.txt" > >
I correct myself to remove an useless line : set myVolume to "/Volumes/George" try do shell script "ls " & myVolume -- check if the volume /Volumes/George exists. If the volume doesn't exists an error occurs -- set myVolume to myVolume -- useless here ;) on error set myVolume to myVolume & "-1" -- if the try statement failed then the volume must be /Volumes/George-1 end try set myDocument to myVolume & "Textfile.txt" Regards, -- -Zryip TheSlug- wish you the best! 8) http://www.aslugontheroad.co.cc _______________________________________________ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution