Tuesday, August 14, 2012

Creating shortcut for a network folder in Mac

*** Read my Update 2 at the bottom of this post for a quick solution. ***

Being Windows User for a long time, it was always easy to create a short cut in Windows using "Ctrl" + "Shift" drag of a folder to Desktop. ("Ctrl" Drag folder Copies the Folder and "Shift" drag moves the folder, in case if you don't know).
In Mac if you drag a folder to Desktop it copies it and if you hold "Apple" key while dragging it moves it. Other way to create a shortcut is to right click and choose "Make Alias". It creates the shortcut in the same folder and then you can move it to the right place.

However if you want to create a shortcut for a network share, for example smb://server_name/shared_folder it was impossible because you may not have right access at smb://server_name level. I found a trick to create a shortcut for network folder using "ln" command. For those of you who don't know, when you access a network share using smb://server/folder, mac automatically mount it under /Volumes/folder(Note: No server name over here). Just open up terminal window and switch to Desktop folder.
Just type this magic command to create a shortcut
$ ln -s /Volumes/<network_folder_name> <Your Shortcut Name>
PS: "ln" stands for link and "ln -s" is for creating "Symbolic Link", fancy name for shortcut in Unix world.

Update1: Found one more option through Google. You can have Mac place the shortcut for all connected Servers in Desktop by checking the option "Connected Serveres" from Finder Preference option. However this will create the link for the Server and not the specific folder you are interested in.
Update 2: Actually if you hold "Command/Apple" + "Option" key while dragging folder to the desktop it creates the shortcut. Just drag the folder to the Desktop while holding the above two keys from /Volumes/folder_name location.

No comments:

Post a Comment