How can you replace all symbolic-links in a directory (and children) with their targets on Mac OS X? If the target is not available, I'd prefer to leave the soft link alone.
|
feedback
|
|
If you are using mac OSX aliases, then You can use the following [Node.js] script to move/copy the targets of your symlinks to another directory:
| |||
|
feedback
|
|
Here are versions of chmeee's answer that uses New filename equals old link name:
New filename equals target name:
| |||||||
feedback
|
|
You didn't say what names the files should have after the replacement. This script considers the replaced links should have the same names they had as links.
If you want the files to have the same name as the target, this should do.
| ||||
|
feedback
|