Aliases don't copy correctly across volumes...

I recently used Finder to copy an entire user folder from the hard drive of my old computer to the hard drive of my new computer. In that folder are a lot of aliases that point to folders within the folder structure. For example:

Folder M222 contains folders: Materials & F18

F18 contains an alias that points to a subfolder of Materials


After copying folder M222 by dragging it to the new computer's hard drive, the alias under F18 no longer works. It still references the entire original path, rather than the relative path on the new copy. I know how to fix aliases, but I have lots of these aliases, serving as an organization method for 10+ years of work. Questions:

  1. Why are the copies of the aliases not pointing to the copied items?
  2. How can I copy them so that they do?


FYI: Both hard drives are SSDs, using the new APFS file system. The old computer had High Sierra & the new computer is running Mojave (10.14.5)

MacBook Pro 15", macOS 10.13

Posted on Jun 13, 2019 9:33 PM

Reply
Question marked as Top-ranking reply

Posted on Jun 18, 2019 11:33 PM

I appreciate your interest in this thread, but actually in MacOS, there are different kinds of links and I think you are mistaking symbolic links for aliases. Symbolic links are a fixed path and are not changed by copying, but it turns-out that in MacOS, aliases are smarter than that; they change when the file is moved or renamed. Furthermore, it if you copy a folder that contains both and item and an alias to it somewhere, then when Finder copies the folder, it will alter the alias to point to the copy, preserving the relative structure of the copy of the folder. This only happens if the alias & item are both within the structure of the folder being copied. This will NOT work for symbolic links, since they are not resolved at the level of the Finder.


Anyway, I've resolved the issue. It turns out that some permissions were messed-up for some of the files, which interfered with the Finder's ability to create aliases of those files. Thus when Finder copied it, it could not create aliases of the new files, so it left them pointing to the original files (instead of the copies).


This can be fixed by making sure permissions are correct before copying the folder over. In my case, because I have so many aliases within my folder structure, it was easiest to simply reset the permissions of the entire User directory before copying it. In particular, the "Reset Permissions" part of article HT203538 helped me do this.


By the way, here are some links with information on the different types of file linking and how they differ, that I found useful; they include Mac aliases, symbolic links, and hard links:

Similar questions

4 replies
Question marked as Top-ranking reply

Jun 18, 2019 11:33 PM in response to Barney-15E

I appreciate your interest in this thread, but actually in MacOS, there are different kinds of links and I think you are mistaking symbolic links for aliases. Symbolic links are a fixed path and are not changed by copying, but it turns-out that in MacOS, aliases are smarter than that; they change when the file is moved or renamed. Furthermore, it if you copy a folder that contains both and item and an alias to it somewhere, then when Finder copies the folder, it will alter the alias to point to the copy, preserving the relative structure of the copy of the folder. This only happens if the alias & item are both within the structure of the folder being copied. This will NOT work for symbolic links, since they are not resolved at the level of the Finder.


Anyway, I've resolved the issue. It turns out that some permissions were messed-up for some of the files, which interfered with the Finder's ability to create aliases of those files. Thus when Finder copied it, it could not create aliases of the new files, so it left them pointing to the original files (instead of the copies).


This can be fixed by making sure permissions are correct before copying the folder over. In my case, because I have so many aliases within my folder structure, it was easiest to simply reset the permissions of the entire User directory before copying it. In particular, the "Reset Permissions" part of article HT203538 helped me do this.


By the way, here are some links with information on the different types of file linking and how they differ, that I found useful; they include Mac aliases, symbolic links, and hard links:

Jun 16, 2019 10:05 PM in response to Barney-15E

I'm not convinced that you are correct. What you describe does not seem like intuitive behavior at all, because it would not maintain the fidelity of the copies structure; the copy of the folder & its contents would not be just like the original folder.


Let me clarify. In the folder that I am copying, there are aliases that point to other things also in the folder being copied. The intuitive behavior for copying this folder would be that any aliases in the folder that point to things that are also in the folder should (in the copied folder) point to the duplicates, not the original.


For example:

If Folder contains an Item and an Alias, where Alias points to Item, then the reasonable result of copying Folder to a new location would be to get Copy of Folder, which should contain Copy of Item and Alias2, where Alias2 points to Copy of Item, NOT to Item.


In fact, I believe I have evidence to this fact, because when I investigated my situation more, I found that most of the aliases point to the new files (i.e. copy of item) above, but a few don't. I can't tell why this happened, but did discover that when I tried to repair the aliases by pointing them to the new files, I got a permissions error. To correct them, I had to reset the permissions on the entire user's directory, but I'm not sure why the problem happened to begin with.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Aliases don't copy correctly across volumes...

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.