Mac OSX Leopard and server connections

zryip theSlug zryip.theslug at
Fri Feb 5 18:12:49 EST 2010

2010/2/5 Dan Soneson <sonesond1 at>:
> Hi everyone,
> I have a rather odd problem using rev applications on Mac OSX Leopard, connecting to a server on my network. I connect to a server with an Applescript command: do theScript as Applescript. I can do this just fine. But if I unmount the server  by dragging it's icon to the trash, then remount from within Rev eventually Rev reads the name of the server differently. Let's say the name of the server is "George". I can connect to "George" several times, but eventually Rev or Leopard appends a digit to the name of the mounted volume.
> Originally, the path to file "Textfile.txt" on the server named "George" will be "/Volumes/George/Textfile.txt" However, after a few connections (don't know how many or exactly when this happens), the path to the file becomes "/Volumes/George-1/Textfile.txt". Oddly enough, the icon on the desktop for the volume is still "George". However, any reference to the file "Textfile.txt" from within Rev now will fail, since Rev reads the connection as "/Volumes/George-1/Textfile.txt" but is still looking for "/Volumes/George/Textfile.txt"!  This gets somewhat frustrating, since I never know when it will happen, and once it does, I can no longer transfer files back and forth between the server and the computer.
> Has anyone seen this behavior? Do you have a workaround or a suggestion to get around this problem? I never had the problem working with pre-Leopard operating systems on the Mac, but it is now cropping up since all our computers in a lab are now running Leopard.
> Another issue may be that the physical server (now running OSX Snow Leopard) has several share points, each of which may be mounted as individual volumes, one of which is the aforementioned "George". Mounting and unmounting several of these share points may bring about the re-numbering issue. Rebooting the individual computer doesn't seem to help either.
> Thanks for any suggestions.

Hi Dan,

To resolve your problem you could use a try statement like this:

	set myVolume to "/Volumes/George"
		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"

If you want a list of all volumes mounted and try something different,
you can use :

paragraphs of (do shell script "/bin/ls /Volumes")

-Zryip TheSlug- wish you the best! 8)

More information about the Use-livecode mailing list