Errror using mklink /J to create symbolic link


  1. Posts : 373
    Windows 10 Home 21H2
       #1

    Errror using mklink /J to create symbolic link


    .
    I want to release space on C, by moving AppData to D: using a symbolic link.

    I tried the following command at the DOS prompt under Admin privileges:

    mklink /J "C:\Users\<me>\AppData" "D:\AppData"

    I got the error message: Cannot create a file when that file already exists.

    The file "D:\AppData" does NOT exist.

    I would be grateful for any assistance.

    Thanks
    .
      My Computer


  2. Posts : 4,594
    several
       #2

    Dont you already have folder %userprofile%\appdata ?

    mklink /j %userprofile%\appdata2 d:\appdata

    should work if the target d:\appdata exists

    e.g.

    mklink /J c:\alias c:\target
      My Computer


  3. Posts : 373
    Windows 10 Home 21H2
    Thread Starter
       #3

    .
    SIW2 said:
    Dont you already have folder %userprofile%\appdata ?
    .
    .
    Yes.
    .
    SIW2 said:
    mklink /j %userprofile%\appdata2 d:\appdata

    should work if the target d:\appdata exists
    .
    .
    That works.

    As a result, I have a new folder in %USERPROFILE%\appdata2

    That folder has an icon with an arrow pointing North-East

    I also have dozens of new folders scattered under C:\Users\<me> in various sub-folders, and sub-sub-folders

    Each of these new folders has the icon with the arrow. For example: History, Temporary Internet Files, Application Data, and so on. Is that normal?

    CONCLUSION:

    By reverse-engineering your instructions, and the results thereof, I'm guessing that I now need to do the following:

    - By normal Windows methods, manually copy all the files that are currently in %USERPROFILE% to a new folder called AppData on D:

    - In the Admin DOS console, do:
    --- mklink /j %USERPROFILE%\AppData D:\AppData

    RESULT: The space currently occupied by data files on C: will be released to the OS.

    Thanks
    .
      My Computer


  4. Posts : 16,955
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #4

    There's some guidance in
    Relocating AppData Folder?


    Best of luck,
    Denis
      My Computer


  5. Posts : 373
    Windows 10 Home 21H2
    Thread Starter
       #5

    .
    Try3 said:
    There's some guidance in
    Relocating AppData Folder?
    .
    Thanks for the link
    .
      My Computer


 

  Related Discussions
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 18:57.
Find Us




Windows 10 Forums