How to make a symbolic link folder that acts as a normal folder

Discussion in 'macOS Sierra (10.12)' started by Cattywampus_, Jun 18, 2017.

  1. Cattywampus_ macrumors 6502a

    Joined:
    Apr 19, 2006
    #1
    Hi,

    I am having issues with creating a symbolic link on my Mac mini. I can create one, but it just comes out as a standard alias. I am trying to make a link to a folder that appears in Finder as if it was located at that location. I want it to have the little chevron next to the folder that allows the expansion of the folder contents.

    As I said, using 'ln -s original_folder link_folder' just creates an alias folder link.

    Unfortunately, I am trying to accomplish something specific, and when using the above method, the application I am using doesn't read it as if the contents of the original folder are at the location where I want the link to be, it simply redirects to the original and thus what I am trying to do fails.

    For more clarification:

    I have an external hard drive with my Dropbox folder on it. (so at '/Volumes/External/Dropbox/')
    I want a symbolic link to the folder in the users folder ( '~/Dropbox/')

    Using 'ln -s' just creates and alias that then just redirects to the external drive. I want a link that effectively makes any application see the contents of the Dropbox folder on the external drive at ~/Dropbox.

    I managed to do this exact thing on my QNAP NAS and on my Windows 10 desktop.

    Any help appreciated. Thanks.
     
  2. treekram macrumors 65832

    Joined:
    Nov 9, 2015
    Location:
    Honolulu HI
    #2
    There's some ambiguity in your description (at least for me), but this is my best guess.

    So, was the command that you used:

    ln -s /Volumes/External/Dropbox/ ~/Dropbox/

    And the result was a folder Dropbox in your ~/Dropbox folder? (So ~/Dropbox/Dropbox)

    If so, you cannot have the Dropbox folder existing in ~/ before creating the link. You also need to remove the last slash in the second Dropbox, so it would be:

    rm ~/Dropbox/Dropbox (remove the link you created)
    rmdir ~/Dropbox
    ln -s /Volumes/External/Dropbox/ ~/Dropbox

    If you're trying to combine existing files from ~/Dropbox and files in /Volumes/External/Dropbox into a single directory there's a different way to go about that - basically a symbolic link for each file/directory in /Volumes/External/Dropbox.
     
  3. Cattywampus_ thread starter macrumors 6502a

    Joined:
    Apr 19, 2006
    #4
    Hi

    Thank you for your replies. Forgive me, but what I thought hadn't worked, did actually work. For anyone who is interested:

    I store my substantial iTunes library on my Dropbox Pro account. I sync it across 4 different computers, and the Dropbox folder is stored in different locations on each of the computers (on external drives etc).

    In order for iTunes to 'see' all the media at the same path, ~/Dropbox/Music/, I needed symbolic links at that location pointing to where the Dropbox folder is actually stored.

    On my QNAP NAS and Windows desktop, when I did symbolic links there, it made it look like the Dropbox folder was actually at the location of the symbolic link. When doing it in macOS, that just created what looked like an alias. When opening iTunes and getting info on music files, the path was different to what it was on my other machines (~/Dropbox/Music). I thought it was going to cause 'missing files' when I loaded it up on another machine next time.

    Actually it appears this isn't the case and although it does show the original path, it doesn't seem to change the actual paths in the iTunes library, therefore no 'missing media' issues.

    Thanks again though for your help.
     

Share This Page