Re: Path to Disk Image
Re: Path to Disk Image
- Subject: Re: Path to Disk Image
- From: Martin Orpen <email@hidden>
- Date: Fri, 02 Sep 2005 22:07:21 +0100
on 2/9/05 19:16, Luther Fuller at email@hidden wrote:
> When one does a Get Info on a disk mounted from a disk image (.dmg)
> file, the Get Info window shows the item Disk Image: followed by the
> path to the disk image file that mounted the disk. And this is
> exactly the info I need to get via an AppleScript command.
>
> Does anyone know how to do this?
Hacking aliases is a messy but useful way of getting this sort of
information. I use this as a method of getting IP addresses from mounted
servers.
Make an alias of the mounted disk and then use strings to look at the rsrc
information:
strings /path/to/Desktop/Target\ alias/rsrc | head
And you should see both Mac and Unix paths as the last couple of lines.
If you know the boot disk name and username then you'll be able to return
just the paths using something like:
| awk 'Macintosh\ HD:|username\//'
Regards
--
Martin Orpen
_______________________________________________
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