PDA

View Full Version : Network path name help needed


Nostromo
08-30-2006, 01:45 PM
Is there any way to fool a Mac into thinking that a mounted server has a different name (and path name) than its actual name?

Here's the problem: I have several users who store their Quark files (and all related graphics) on a file server. So for several years they've been saving files containing a path name that includes the name of the server.

So last week the server is "upgraded", and the name of the mounted network drive changes. This renders all of the path names within their Quark files invalid, since it's looking for the old server name. They now face having to manually relink the graphics in their Quark files, which will bring their workflow to an absolute standstill. We're talking hundreds of Quark files and thousands of pictures that would need to be relinked manually.

- hiring an intern to do it isn't feasable, since some of these files contain confidential information
- none of the third-party Quark XTensions can do a batch search/replace of a word in a path name (we even called Quark and they said this isn't possible)
- renaming the network share can't be done, since the new server is used by everyone and the old server name would confuse everyone else on the network

I've also searched high and low for Applescripts that might fix this, but no luck.

Is there any UNIX trick that I can use that can tell the Mac "even though that mounted disk has XXXX name, for path name purposes, it now has YYYY name"?

One solution I'm looking into is taking a spare XServe and just giving that the old server name and copying their data to it. If there's a one-shot UNIX command I can use to fix this, that would be best of all.

Thanks for any help!


-N

ElectricSheep
08-30-2006, 03:50 PM
I'm going to assume you are sharing using AFP. You can do this at the command line like this:

mkdir /Volumes/<oldname>
mount_afp afp://username:userpass@server.company.com/<newname>/ /Volumes/<oldname>

see man mount_afp

hayne
08-30-2006, 04:47 PM
Is there any UNIX trick that I can use that can tell the Mac "even though that mounted disk has XXXX name, for path name purposes, it now has YYYY name"?

While what ElectricSheep has suggested should work, I think a sufficient and much simpler solution for you would be to simply make a symbolic link from the old pathname to the current pathname.
E.g. if the old server was "fred", then the path to where it gets mounted in OS X is "/Volumes/fred"
If the new server name is "julie", then the path to where it gets mounted is "/Volumes/julie"
So if you create a symbolic link that points from "/Volumes/fred" to "/Volumes/julie", any software that is looking for something under "/Volumes/fred" will find it via the symbolic link.
You would create such a symbolic link via a command like:

sudo ln -s "/Volumes/julie" "/Volumes/fred"

See this Unix FAQ (http://forums.macosxhints.com/showthread.php?t=40648) for more details.

voldenuit
08-30-2006, 05:01 PM
Wouldn't oldservername with oldvolume and newvolume as shares do just fine to avoid otherwise clever mount_afp trickery ?

The Fred and Julie thing would work as well, it might confuse people looking for the old Volumename, but it's definitely a lot more robust than a custom mount command.

hayne
08-30-2006, 06:27 PM
The Fred and Julie thing would work as well, it might confuse people looking for the old Volumename
I'm not sure I understand what you are getting at.
"fred" was just a stand-in for the actual old volume name.