Create a symbolic link on Windows 10

Solved
Meguitou Posted messages 19 Status Member -  
Meguitou Posted messages 19 Status Member -

Hello experts, I need your help!

I’m trying to perform an operation on my PC (LENOVO ideapad 310-15IKB) and I'm stuck at this stage: I want to move files from a large folder on my main hard drive C:\, which is almost out of space, to my external hard drive D:\, which is already integrated into the PC.

While searching a bit on the internet, I came across the method to create a symbolic link, and I successfully created the source path, but I can't seem to redirect it to the destination on my external hard drive. When I'm in the command prompt and I enter the path I've chosen, it tells me "'/D' is not recognized as an internal or external command, operable program or batch file."

I also followed a tutorial to modify the system environment variables and add the path I wanted, but I'm still getting the same message. Maybe I didn't enter the right command, but I've already tried several and I don't know what else to do.

Thanks in advance!

2 answers

  1. jee pee Posted messages 31889 Registration date   Status Moderator Last intervention   9 981
     

    Hello,

    You should provide us with the commands you are running and the link to the manipulation you are performing.

    For example, I want to create a new symbolic directory on C, which will give me access to the images currently on D:

    mklink /D "C:\Photos" "D:\Photos"

    0
    1. Meguitou Posted messages 19 Status Member 2
       

      So for the starting link on C:\ no problem, it is well recognized, I typed the command:

      cd "C:\Users\etc...."

      and for the destination command on D:\ that's where I have a doubt. I tried mklink /D + the path on my external hard drive, with quotes, without quotes, with or without spaces, in short, quite a few combinations, none of which worked

      0
      1. jee pee Posted messages 31889 Registration date   Status Moderator Last intervention   9 981 > Meguitou Posted messages 19 Status Member
         

        The command consists of 2 names, the symbolic link that will be created on C, it must not exist beforehand, and the existing physical directory on D: as in my command, C:\Photos, the future symbolic link does not exist, D:\Photos exists

        mklink /D "C:\Photos" "D:\Photos"
        0
      2. Meguitou Posted messages 19 Status Member 2 > jee pee Posted messages 31889 Registration date   Status Moderator Last intervention  
         

        Thank you for your response, but I need clarification because I'm not sure I understood correctly. In what order should we create the symbolic link? I thought we had to create the folder where we were going to move the files first, but the problem I have now is that if I leave the folder in D:\ (the final destination) and delete the folder in C:\, it shows me the message "Cannot create a file that already exists," and conversely, if I leave the folder in C:\ and try to do the operation, it tells me "The specified path was not found." I admit I'm lost here lol

        0
  2. jee pee Posted messages 31889 Registration date   Status Moderator Last intervention   9 981
     

    If you have photos in C:\Photos, you need to move them to d:\photos.

    When C:\Photos is empty (make sure to check), you need to delete the folder and then create the link

     mklink /D "C:\Photos" "D:\Photos"

    But which folder is actually concerned? Because certain specific Windows folders can be moved without using this method.


    0
    1. Meguitou Posted messages 19 Status Member 2
       

      So to explain exactly what I'm trying to do: I want to move a folder containing several subfolders that is located in C:\ where there are files that allow me to play a video game. This folder is very large (17 GB) and my C:\ drive is almost full. So I want to move it to D:\, but for the game to work, it must "think" that the folder is still in C:\ and someone suggested creating a symbolic link.

      0
      1. jee pee Posted messages 31889 Registration date   Status Moderator Last intervention   9 981 > Meguitou Posted messages 19 Status Member
         

        So if C:\game creates a D:\game

        move all files from c:\game to D:\game

        delete c:\game (if it is empty)

         mklink /D "C:\game" "D:\game"
        0
      2. Meguitou Posted messages 19 Status Member 2 > jee pee Posted messages 31889 Registration date   Status Moderator Last intervention  
         

        That's exactly what I typed as the command, but it says "the specified path is not found." I copied the folder from C:\ to D:\ and then removed the folder in C:\ which was permanently deleted because it was too large to remain in the recycle bin, and since then I'm stuck.

        My command was as follows:

         mklink /D “C:\Users\My name\Documents\Game” “D:\Game”
        0