Quick way to create a symlink? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Should an RSS feed of hot network questions feed any chat room(s) here?Can I create Windows-style alias in Finder?Is there any way to create a hard link in the finder?Is there a way to force Finder to attempt to move something from a read-only folder?How to create an alias with drag and drop?How to assign a keyboard shortcut to create an empty text file in Finder?How can I create a modifier shortcut to drag files into a new folder?Symlink to app causes NSInternalInconsistencyExceptionTo search contents of symlinkStop Finder from creating aliases when moving ApplicationsAutomator service to create Dropbox symlink
Novel: non-telepath helps overthrow rule by telepaths
How could we fake a moon landing now?
How come Sam didn't become Lord of Horn Hill?
Is there such thing as an Availability Group failover trigger?
Crossing US/Canada Border for less than 24 hours
Is there any way for the UK Prime Minister to make a motion directly dependent on Government confidence?
Can a new player join a group only when a new campaign starts?
Maximum summed powersets with non-adjacent items
Do square wave exist?
Do wooden building fires get hotter than 600°C?
Is it fair for a professor to grade us on the possession of past papers?
Fundamental Solution of the Pell Equation
Extracting terms with certain heads in a function
Trademark violation for app?
What is this building called? (It was built in 2002)
Closed form of recurrent arithmetic series summation
What does this Jacques Hadamard quote mean?
First console to have temporary backward compatibility
Can anything be seen from the center of the Boötes void? How dark would it be?
Is it a good idea to use CNN to classify 1D signal?
Why wasn't DOSKEY integrated with command.com?
Is the Standard Deduction better than Itemized when both are the same amount?
Delete nth line from bottom
Why do the resolve message appear first?
Quick way to create a symlink?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Should an RSS feed of hot network questions feed any chat room(s) here?Can I create Windows-style alias in Finder?Is there any way to create a hard link in the finder?Is there a way to force Finder to attempt to move something from a read-only folder?How to create an alias with drag and drop?How to assign a keyboard shortcut to create an empty text file in Finder?How can I create a modifier shortcut to drag files into a new folder?Symlink to app causes NSInternalInconsistencyExceptionTo search contents of symlinkStop Finder from creating aliases when moving ApplicationsAutomator service to create Dropbox symlink
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Dragging a folder in Finder while pressing Command + Options (⌘ + ⌥) creates an alias. But is there a quick and similar way to create a symlink this way?
macos finder
add a comment |
Dragging a folder in Finder while pressing Command + Options (⌘ + ⌥) creates an alias. But is there a quick and similar way to create a symlink this way?
macos finder
4
Frustrating, isn’t it? I would prefer a symlink to an alias about 80% of the time. I like the solution from @user3439894, and in combination with a launcher (lots of good, open source ones available), or simply Automator, you can streamline the process very aptly.
– CJK
7 hours ago
add a comment |
Dragging a folder in Finder while pressing Command + Options (⌘ + ⌥) creates an alias. But is there a quick and similar way to create a symlink this way?
macos finder
Dragging a folder in Finder while pressing Command + Options (⌘ + ⌥) creates an alias. But is there a quick and similar way to create a symlink this way?
macos finder
macos finder
edited 6 hours ago
slm
1,046715
1,046715
asked 10 hours ago
thomasdecrickthomasdecrick
1183
1183
4
Frustrating, isn’t it? I would prefer a symlink to an alias about 80% of the time. I like the solution from @user3439894, and in combination with a launcher (lots of good, open source ones available), or simply Automator, you can streamline the process very aptly.
– CJK
7 hours ago
add a comment |
4
Frustrating, isn’t it? I would prefer a symlink to an alias about 80% of the time. I like the solution from @user3439894, and in combination with a launcher (lots of good, open source ones available), or simply Automator, you can streamline the process very aptly.
– CJK
7 hours ago
4
4
Frustrating, isn’t it? I would prefer a symlink to an alias about 80% of the time. I like the solution from @user3439894, and in combination with a launcher (lots of good, open source ones available), or simply Automator, you can streamline the process very aptly.
– CJK
7 hours ago
Frustrating, isn’t it? I would prefer a symlink to an alias about 80% of the time. I like the solution from @user3439894, and in combination with a launcher (lots of good, open source ones available), or simply Automator, you can streamline the process very aptly.
– CJK
7 hours ago
add a comment |
2 Answers
2
active
oldest
votes
The service SymbolicLinker will do what you need.
add a comment |
macOS does not have a native drag and drop method to create a symlink in the same manner as creating an alias in Finder. By default, symlinks are created by using ln from the command line in Terminal.
In Terminal:
$ ln
usage: ln [-Ffhinsv] source_file [target_file]
ln [-Ffhinsv] source_file ... target_dir
link source_file target_file
$
For additional details, use: man ln
For a homegrown solution using Automator and AppleScript, the following is a bare-bones example of an Automator Service (QuickAction in macOS Mojave) that when assigned a keyboard shortcut, e.g. ⌘S in System Preferences > Keyboard > Shortcuts > Services, will create a symlink of the selected items in Finder at the selected destination folder that is brought up by pressing e.g. ⌘S:
This Service (QuickAction) will be available on the Services menu in Finder or from right-click Context menu, and or the assigned keyboard shortcut once an item or items are selected in Finder.
Bare-bones example AppleScript code:
on run input, parameters
if input is equal to then return
activate
set posixPath to POSIX path of (choose folder with prompt ¬
"Select destination folder for Symlink..." default location ¬
(path to desktop folder) with invisibles)
repeat with thisItem in input
set thisItem to POSIX path of (thisItem as alias)
try
do shell script "ln -s " & quoted form of thisItem & ¬
space & quoted form of posixPath
end try
end repeat
end run
The example AppleScript code assumes you have write privileges at the selected destination folder, other then the selected items source folder, and as coded only creates the symlink if it doesn't already exist. Changes can be made to the code to accommodate other options.

Note: The example AppleScript code is just that and, other then a single try statement, does not contain any additional error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The service SymbolicLinker will do what you need.
add a comment |
The service SymbolicLinker will do what you need.
add a comment |
The service SymbolicLinker will do what you need.
The service SymbolicLinker will do what you need.
answered 9 hours ago
Jeffrey J WeimerJeffrey J Weimer
1515
1515
add a comment |
add a comment |
macOS does not have a native drag and drop method to create a symlink in the same manner as creating an alias in Finder. By default, symlinks are created by using ln from the command line in Terminal.
In Terminal:
$ ln
usage: ln [-Ffhinsv] source_file [target_file]
ln [-Ffhinsv] source_file ... target_dir
link source_file target_file
$
For additional details, use: man ln
For a homegrown solution using Automator and AppleScript, the following is a bare-bones example of an Automator Service (QuickAction in macOS Mojave) that when assigned a keyboard shortcut, e.g. ⌘S in System Preferences > Keyboard > Shortcuts > Services, will create a symlink of the selected items in Finder at the selected destination folder that is brought up by pressing e.g. ⌘S:
This Service (QuickAction) will be available on the Services menu in Finder or from right-click Context menu, and or the assigned keyboard shortcut once an item or items are selected in Finder.
Bare-bones example AppleScript code:
on run input, parameters
if input is equal to then return
activate
set posixPath to POSIX path of (choose folder with prompt ¬
"Select destination folder for Symlink..." default location ¬
(path to desktop folder) with invisibles)
repeat with thisItem in input
set thisItem to POSIX path of (thisItem as alias)
try
do shell script "ln -s " & quoted form of thisItem & ¬
space & quoted form of posixPath
end try
end repeat
end run
The example AppleScript code assumes you have write privileges at the selected destination folder, other then the selected items source folder, and as coded only creates the symlink if it doesn't already exist. Changes can be made to the code to accommodate other options.

Note: The example AppleScript code is just that and, other then a single try statement, does not contain any additional error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.
add a comment |
macOS does not have a native drag and drop method to create a symlink in the same manner as creating an alias in Finder. By default, symlinks are created by using ln from the command line in Terminal.
In Terminal:
$ ln
usage: ln [-Ffhinsv] source_file [target_file]
ln [-Ffhinsv] source_file ... target_dir
link source_file target_file
$
For additional details, use: man ln
For a homegrown solution using Automator and AppleScript, the following is a bare-bones example of an Automator Service (QuickAction in macOS Mojave) that when assigned a keyboard shortcut, e.g. ⌘S in System Preferences > Keyboard > Shortcuts > Services, will create a symlink of the selected items in Finder at the selected destination folder that is brought up by pressing e.g. ⌘S:
This Service (QuickAction) will be available on the Services menu in Finder or from right-click Context menu, and or the assigned keyboard shortcut once an item or items are selected in Finder.
Bare-bones example AppleScript code:
on run input, parameters
if input is equal to then return
activate
set posixPath to POSIX path of (choose folder with prompt ¬
"Select destination folder for Symlink..." default location ¬
(path to desktop folder) with invisibles)
repeat with thisItem in input
set thisItem to POSIX path of (thisItem as alias)
try
do shell script "ln -s " & quoted form of thisItem & ¬
space & quoted form of posixPath
end try
end repeat
end run
The example AppleScript code assumes you have write privileges at the selected destination folder, other then the selected items source folder, and as coded only creates the symlink if it doesn't already exist. Changes can be made to the code to accommodate other options.

Note: The example AppleScript code is just that and, other then a single try statement, does not contain any additional error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.
add a comment |
macOS does not have a native drag and drop method to create a symlink in the same manner as creating an alias in Finder. By default, symlinks are created by using ln from the command line in Terminal.
In Terminal:
$ ln
usage: ln [-Ffhinsv] source_file [target_file]
ln [-Ffhinsv] source_file ... target_dir
link source_file target_file
$
For additional details, use: man ln
For a homegrown solution using Automator and AppleScript, the following is a bare-bones example of an Automator Service (QuickAction in macOS Mojave) that when assigned a keyboard shortcut, e.g. ⌘S in System Preferences > Keyboard > Shortcuts > Services, will create a symlink of the selected items in Finder at the selected destination folder that is brought up by pressing e.g. ⌘S:
This Service (QuickAction) will be available on the Services menu in Finder or from right-click Context menu, and or the assigned keyboard shortcut once an item or items are selected in Finder.
Bare-bones example AppleScript code:
on run input, parameters
if input is equal to then return
activate
set posixPath to POSIX path of (choose folder with prompt ¬
"Select destination folder for Symlink..." default location ¬
(path to desktop folder) with invisibles)
repeat with thisItem in input
set thisItem to POSIX path of (thisItem as alias)
try
do shell script "ln -s " & quoted form of thisItem & ¬
space & quoted form of posixPath
end try
end repeat
end run
The example AppleScript code assumes you have write privileges at the selected destination folder, other then the selected items source folder, and as coded only creates the symlink if it doesn't already exist. Changes can be made to the code to accommodate other options.

Note: The example AppleScript code is just that and, other then a single try statement, does not contain any additional error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.
macOS does not have a native drag and drop method to create a symlink in the same manner as creating an alias in Finder. By default, symlinks are created by using ln from the command line in Terminal.
In Terminal:
$ ln
usage: ln [-Ffhinsv] source_file [target_file]
ln [-Ffhinsv] source_file ... target_dir
link source_file target_file
$
For additional details, use: man ln
For a homegrown solution using Automator and AppleScript, the following is a bare-bones example of an Automator Service (QuickAction in macOS Mojave) that when assigned a keyboard shortcut, e.g. ⌘S in System Preferences > Keyboard > Shortcuts > Services, will create a symlink of the selected items in Finder at the selected destination folder that is brought up by pressing e.g. ⌘S:
This Service (QuickAction) will be available on the Services menu in Finder or from right-click Context menu, and or the assigned keyboard shortcut once an item or items are selected in Finder.
Bare-bones example AppleScript code:
on run input, parameters
if input is equal to then return
activate
set posixPath to POSIX path of (choose folder with prompt ¬
"Select destination folder for Symlink..." default location ¬
(path to desktop folder) with invisibles)
repeat with thisItem in input
set thisItem to POSIX path of (thisItem as alias)
try
do shell script "ln -s " & quoted form of thisItem & ¬
space & quoted form of posixPath
end try
end repeat
end run
The example AppleScript code assumes you have write privileges at the selected destination folder, other then the selected items source folder, and as coded only creates the symlink if it doesn't already exist. Changes can be made to the code to accommodate other options.

Note: The example AppleScript code is just that and, other then a single try statement, does not contain any additional error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.
edited 5 hours ago
answered 9 hours ago
user3439894user3439894
28.9k64666
28.9k64666
add a comment |
add a comment |
4
Frustrating, isn’t it? I would prefer a symlink to an alias about 80% of the time. I like the solution from @user3439894, and in combination with a launcher (lots of good, open source ones available), or simply Automator, you can streamline the process very aptly.
– CJK
7 hours ago