How to Recreate Old Aliases in Bulk to Reduce File Size

aliasfilesystemfinder

I noticed that in recent versions of macOS, aliases I create are smaller than they used to be. I have a folder full of old aliases whose sizes range from 50 KB to 6 MB, but new aliases seem to be always less than 1 KB.

I want to recreate all my large, old aliases to save disk space. I know I can update an individual alias by finding the file the alias points to, deleting the alias, and option-command-dragging the original to where the alias was. However, this loses the Date Created of the alias, and more steps are needed to preserve the name of the alias if it is different from the original file. Also, this would take too long to do for my hundreds of aliases. How can I shrink my aliases in bulk while preserving the name and Date Created?

There is another, very similar question Recreate an alias with the same name and timestamp programmatically. The difference is that that question requires an answer that doesn’t change the Date Modified of the alias. I am fine with the Date Modified being updated, as long as the Date Created is unchanged.

Best Answer

On macOS 10.14 Mojave, inspecting any individual legacy alias with Get Info (I) causes it to be regenerated with a smaller size.

To use Get Info to regenerate aliases in bulk, first show a list of the aliases to update in Finder in List View. To find all your aliases, press Space to open a new search in Finder, click ‘+’ to add an criterion, and set the criterion to “Kind” is “Other”, typing in “Alias”.

In this list of aliases in Finder, select the top result, then press I to Show Inspector. The selected alias will be regenerated – you will see its size go down. Now hold down the ↓ arrow key to select each alias one at a time. Each of them will be regenerated, getting an updated Date Modified but keeping its Date Created.

You have to inspect each alias one at a time because inspecting multiple aliases will only update the first one.