Windows 10: Update symlinks after moving target folder

  1.    16 Nov 2017 #1

    Update symlinks after moving target folder


    Hi,
    I'm a photographer who recently started using symlinks to classify my photos into categories (read folders) on my windows 10 laptop. The target RAW files stay in folders on a removable HDD. Issue: I need to move the target folders a little (one step up or down the tree), and rename one of them. The filenames remain unchanged. Is there any program or utility out there which will allow me to change the symlink targets to point to the new locations, in batches, without me having to delete all the dead symlinks and create them again? Basically update the links the symlinks point to?
    Thanks
      My ComputerSystem Spec


  2. Posts : 268
    Windows 10
       16 Nov 2017 #2

    I suspect that Windows can handle this automatically ...

    SETUP
    I created a folder on the desktop called "m" for master, and I put a file there called "f.txt".
    I created a shortcut on the desktop that references that "f.txt" file.
    So ... the shortcut references "C:\Users\<user>\Desktop\m\f.txt"

    TESTING
    With Windows Explorer ...
    I created a new folder on the desktop called "new".
    I moved the "m" master folder into the "new" folder.
    The desktop shortcut still works!
    It now references "C:\Users\<user>\Desktop\new\m\f.txt"
    Perfect!

    Then I renamed the "m" folder to "n".
    Once again the desktop shortcut works.
    It now references "C:\Users\<user>\Desktop\new\n\f.txt"
    Perfect!

    All of this works because the moving and renaming was done with Windows Explorer.
    I'm pretty sure it will NOT work from a console command prompt.

    OPEN QUESTION
    This works properly for the internal C: drive.
    Will it work with an external drive? I don't know.
    Do a simple test ... just a couple of files ... and see if it works.
    Last edited by margrave55; 19 Nov 2017 at 16:08.
      My ComputerSystem Spec

  3.    16 Nov 2017 #3

    Thanks @margrave55

    To check, I moved two files into their parent folder and tried accessing them again using the symlinks. Didn't work. No error message, but the files didn't open either. Basically nothing happened. I moved the files back again, and the symlinks worked once more.

    Did you create symlinks or shortcuts? I suspect shortcuts would update the paths themselves, but symlinks wont. Not sure about the difference between an external drive vs the internal drive, but my files need to be on an external HDD.
      My ComputerSystem Spec

  4.    16 Nov 2017 #4

    Margrave used shortcuts, which are useless for your (and just about any other non-trivial) purpose.
    For non-trivial symlink handling I would highly recommend you get yourself Schinagl's link shell extension, pretty much the gold standard for this kind of work.
      My ComputerSystem Spec

  5.    16 Nov 2017 #5

    Thanks Pirx,

    The symlinks were made using link shell extension, and work just fine. There's no provision for moving the target files around, though (at least from what I understand).
      My ComputerSystem Spec

  6.    16 Nov 2017 #6

    You are creating symlinks to folders, right? The way I understand your scenario at least there's no good reason to directly symlink individual files, anyway. If you do use symlinks to folders you would be able move around the files within the linked folders in any way you like. Link shell extension can also create a number of more spiffy link constructs (like a "Delorean copy" and similar stuff), but I have never used those. It's possible that one of these better matches your use case, so you could look into these as well.
      My ComputerSystem Spec


  7. Posts : 2,252
    Ubuntu14.04x64 MintMate17x64 Win10Prox64
       17 Nov 2017 #7

    Don't know if this is what you are looking for. Use right click context menu to update links

    For 64 bit Windows: http://download.microsoft.com/downlo...redist_x64.EXE
    For 32 bit Windows: http://download.microsoft.com/downlo...redist_x86.EXE

    Install one of the above then install Link Shell Extension:
    Download: Link Shell Extension

    Open file explorer for both source and destination side by side. Delete all old links then use drag and drop as shown below:

    Click image for larger version. 

Name:	p1.jpg 
Views:	1 
Size:	83.6 KB 
ID:	164269
    Click image for larger version. 

Name:	p2.jpg 
Views:	1 
Size:	105.1 KB 
ID:	164271
    Click image for larger version. 

Name:	p3.jpg 
Views:	1 
Size:	88.8 KB 
ID:	164272
    Last edited by topgundcp; 17 Nov 2017 at 01:58.
      My ComputerSystem Spec

  8.    17 Nov 2017 #8

    @Pirx I've actually linked to files rather than folders. Of all the options available in link shell extension, I thought this was the simplest and easiest for my case . Guess not.
    The setup: I place the original files in folders according to the date and place of shoot on the HDD, and place them in folders with symlinks to the original files on my internal SSD using a theme based classification (e.g. all the shots of Elephants in one folder, Giraffes in another one etc.). Organizing these files have taken me weeks, and I now wish to move the target folders around just a wee bit. There should have been no need, but I made a mistake in the name with two folders containing thousands of files each. @topgundcp I already have this installed
      My ComputerSystem Spec


 

Related Threads
Read more: Release Date for Arris DOCSIS 3.1 Modem a Moving Target | Multichannel
I have a folder that contains links to programs that reside in various other folders, called SysTools. I like to have the links for tools I use for various things in one place. I'm copying the SysTools folder to my Laptop and need to change all...
Moving OneDrive to new folder in General Support
Long story, but I had placed my onedrive folder inside a different online backup folder (I don't know don't ask me why lol). Anyway now I need to move the OneDrive folder back to the main C: drive folder, but I can't figure out how to stop syncing...
Moving Appdata folder in General Support
I am looking to move the Appdata folder within my user file. I have tried previously to move it(changing the location of the files inside it)and it caused system hangs and a loss of the start menu. Ive also tried to do the old method of...
When I create a shortcut to file in Program Files, the target path for that shortcut will be to Program Files (x86), even though the start in path will be correct. Furthermore, even though the target path is incorrect and no icon is displayed for...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 02:18.
Find Us