Re: Getting the original item of an alias file
Re: Getting the original item of an alias file
- Subject: Re: Getting the original item of an alias file
- From: Martin Orpen <email@hidden>
- Date: Tue, 14 Sep 2004 12:35:41 +0100
on 14/9/04 12:25 pm, Helmut Fuchs at email@hidden wrote:
> Hi all,
>
> I need a solution for repointing aliases to a different server (and a
> slightly changed folder hierarchy).
>
> My problem is, that the "original item" of a Finder "alias file" is
> only available when the respective volume is mounted. But the aliases
> are kind of orphaned - the original server is not available any
> more...
>
> I would like to check each alias file, whether it points to the
> server in question and if, get the path from the alias file, modify
> it and set its "original item" to the equivalent position on the new
> one.
>
> Does anybody know of a method running under 10.3 to get at these
> infos from an orphaned alias file?
I've got a non-AS method.
Write the following shell script in whatever editor you want:
#!/bin/sh
/usr/bin/strings "$1/rsrc" | awk 'NR==4,NR==5'
Save it somewhere that the Terminal will find it (/usr/local/bin or
usr/bin) and call it "rAlias".
Give it the relevant permissions using "chmod 755 rAlias"
Type "rAlias " in the Terminal and then drag a troublesome alias into
the window and you should get both Mac and Unix paths returned.
Regards
--
Martin Orpen
Idea Digital Imaging Ltd -- The Image Specialists
http://www.idea-digital.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden