MKLINK – Create and Use Links in Windows

Page 12 of 16 FirstFirst ... 21011121314 ... LastLast

  1. Posts : 925
    Windows 10 Pro
       #110

    If the Target is the file / folder that exists, and the link is the created one that links to the target.

    mklink /d "<target folder>" "<link to target>"

    Why do I get the; cannot create file when that file already exists ?
      My Computer


  2. Posts : 5,656
    Windows 7 Ultimate x64 SP1
       #111

    It is the other way around:
    <symb_link_folder> <source folder>
    mklink /D C:\Work "%USERPROFILE%\desktop\folder"
      My Computer


  3. Posts : 925
    Windows 10 Pro
       #112

    Didn't work, same error; cannot create a file when that file already exists.
      My Computer


  4. Posts : 5,656
    Windows 7 Ultimate x64 SP1
       #113

    Trying to create at the same place of target folder? Copy paste the command you are trying to run.
      My Computer


  5. Posts : 925
    Windows 10 Pro
       #114

    mklink /d "<source folder>" "<target folder>"
    mklink /d "<target folder>" "<source folder>"

    For example; one sub-folder is nested three layers deep called "master files"
    X:\Users\[folder]\[folder]\master_files

    the next folder is located in X:\Master Files
      My Computer


  6. Posts : 5,656
    Windows 7 Ultimate x64 SP1
       #115

    Is there a folder with same name where you are trying to create perhaps? Can a symb link be hidden? It is possible link is there but hidden so any subsequent tries give you the error. See screenshot.

    -mklink.jpg
      My Computer


  7. Posts : 10,455
    Microsoft Windows 7 Home Premium 64-bit Service Pack 1
       #116

    You'll save youself a lot of heartache if you use this tool to create them.https://github.com/amd989/Symlinker
      My Computer


  8. Posts : 925
    Windows 10 Pro
       #117

    Kado - I know, I want to understand why the vanilla method won't work.

    Gokay - The target folder does not have the same name as the source folder, but all the sub-folders of the source folder to which I want to link to the target folder must have the same name.

    The target folder and the source folder should have the same name otherwise it would be pointless for what I'm trying to achieve unless it doesn't matter if the source and target folder name are different as long as the sub-folders remain the same; but I won't know if this is valid until I ever get the symbolic link to work ?
      My Computer


  9. Posts : 5,656
    Windows 7 Ultimate x64 SP1
       #118

    Gokay - The target folder does not have the same name as the source folder, but all the sub-folders of the source folder to which I want to link to the target folder must have the same name.
    Target folder does not need to have the same name as the source folder. You don't need to do anything to sub-folders, they are already there with their original names.

    The target folder and the source folder should have the same name otherwise
    Now you are telling the opposite of what you said above.

    You still have not told us exactly what you are trying to achieve.
    Example: I want to move a program to another place without re-installing.
    - I move the program's installation folder to the other place
    - Create a symlink to the new location from the old one so any calls to the program gets re-directed to the new one seamlessly
    - In this case symlink should be named same as the original folder but the relocated folder can be named anything
    - Any subfolders are still accessible with the same Explorer address

    Apparently you are at fault somewhere. Why not give the real folder structure and what goes where and some more detail instead of vague expressions, and then we can find out what's going on.
      My Computer


  10. Posts : 10,455
    Microsoft Windows 7 Home Premium 64-bit Service Pack 1
       #119

    JerometheGiraff said:
    Kado - I know, I want to understand why the vanilla method won't work.

    Gokay - The target folder does not have the same name as the source folder, but all the sub-folders of the source folder to which I want to link to the target folder must have the same name.

    The target folder and the source folder should have the same name otherwise it would be pointless for what I'm trying to achieve unless it doesn't matter if the source and target folder name are different as long as the sub-folders remain the same; but I won't know if this is valid until I ever get the symbolic link to work ?
    I think your problem may be that the target folder already exists. I think if you are trying to create the junction C:/test/target then only c:/test can exist.
      My Computer


 
Page 12 of 16 FirstFirst ... 21011121314 ... LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

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