This relative newbie (I can do a few very simple scripts only) did a clone-style backup from one HD to another bigger HD so I’d have more disk space. I had a buttload of aliases scattered among the xferred files, and on the new disk these aliases stopped working because although the new disk’s contents were identical to the old one’s, the new disk had a different volume name. So the aliases are looking for the old volume name and coming up empty.
I can fix the aliases manually because in their get-info windows I can still see the pathways to their originals on the old volume, and all I have to do is select a new original using the exact same path except I change the volume. Very tedious though. Is this task scriptable?
TIA, longjump
EDIT: I went back and worked on this for another hour or so before I realized that this not an OS X topic - I found the question in the unanswered posts and read the forum column too quickly.
If you get a list of every alias name and its path, use that list to find the originals, you could repeat through the originals like this (I think) but I think it would be a slow script:
set thePath to brokenAliasPath
set theReplacement to "New Disk Name"
set TID to AppleScript's text item delimiters
set AppleScript's text item delimiters to "Old Disk Name"
set newPath to (text items of thePath)
set AppleScript's text item delimiters to "theReplacement"
set theAlias to newPath as string
set AppleScript's text item delimiters to TID
tell application "Finder"
set theAlias to make new alias file at thePath
end tell
I haven’t figured out the hard part yet - don’t know if I can.
j