How do I keep a Mac folder with aliases synced with the original? Halp!

Post date: 2021-12-02 08:07:53
Views: 95
Hello! I am a musician who manages a set of files (plugins) on my computer in a specific way. I install them into one big folder (as Ableton prefers) and then I have a separate folder with category subfolders and aliases of the original files and then point Ableton to the aliases folder. I would like to keep these in sync with a script so that everything (and only the things) in the original folder is in the aliases folder. Of course, there are challenges to syncing two folders that aren't exact duplicates but should have the same number of identically named files.

My current process involves

1. Install Plugins (typically a single file with a .vst extension) to /Library/Audio/Plug-ins/VST (as my software prefers)

2. I have a Folder in my /Documents where I have aliases of the VST files, sorted into separate subfolders (e.g. /Documents/VST/Reverb, /Documents/VST/Delay)

3. I point my audio software at the aliases folder and am then able to navigate them in an organized fashion within the app interface.


What I'm trying to solve for:
1. I will often forget to create aliases in the alias folder which means Ableton doesn't know about new plugins I install. This is unlikely to change
2. I will sometimes remove plugins from the original folder and not necessarily remember to remove the alias, which means Ableton links to a non-existent plugin which can sometimes cause problems.


I would love to have a script (or several scripts) to compare the contents of /Library/Audio/Plug-ins/VST and /Library/Audio/Plug-ins/VST (including its subdirectories) and then do these two things:
- If any files in the former dont have aliases, create them in an "unsorted" subfolder
- If any aliases in the latter refer to non-existent files, move them to the trash.

Is this possible? I'm thinking it might have a little bit of extra complexity because its not an exact replica? (i.e. something like /vst/samplereverb.vst would have an alias in /documents/vst/reverb/samplereverb.vst)


A clunky way I've thought about doing it is
1. Create a text file of all the files in /plug-ins/VST and subdirectories sorted alphabetically into a flat list.
2. Create a text file of all the files in /documents/VST and subdirectories sorted alphabetically into a flat list.
3. Compare lists
4. Anything that is in list 1 and not in list 2, create an alias in an "unsorted" folder
5. Anything that is in list 2 and not in list 1, move to trash


I'm hoping to use automator or a shell script to do this automatically at regular intervals.
Number of Comments
Please click Here to read the full story.
 
Other Top and Latest Questions:
Informatica says it's not for sale, following Salesforce's reported interest in $10 billion deal
Any good articles about homelessness and "authority" in the US?
Express files for bankruptcy, plans to close nearly 100 stores as investor group looks to save the brand
Hi Grandma, Relax, We have a Newborn
Movie: Life Is Sweet
Given a lifeline by the U.S., Ukraine must now prove it can beat Russia
Here are Wednesday's biggest analyst calls: Tesla, Amazon, Airbnb, Domino's, Walmart, Disney & more
Frieren: Beyond Journey's End: Conquering The Labyrinth
Baby Reindeer: Season 1
Answered: Nested comments on replies