I have an application that writes files, let's say, on folder C:\Users\AppData\FOLDER

I want to create a link so the files end up on D:\FOLDER.

  1. Do I use soft sym link or junction
  2. Why do I have the error "cannot create a file when that file already exists?"

mklink /D D:\FOLDER "C:\Users\AppData\Folder"

Both folders are on the same disk, they do exist, and they are different partitions with the same filesystem (NTFS)

Thanks in advance

  • Junction after you move the folder to the location you want it to be, then create the junction once the original location is gone and copied over to the new folder. The idea is to move the folder and contents to the new location and then create a junction link with the folder name matching the old folder. If the folder exist already, you cannot create a junction. Move the folder to the new location and then create the junction link pointing to the folder you move those too. Nov 7 '20 at 2:59

Move the files & folders form: "C:\Users\AppData\Folder" to "D:\FOLDER" Then delete "C:\Users\AppData\Folder" and: mklink /d "C:\Users\AppData\Folder" "D:\Folder"

Or rename "C:\Users\AppData\Folder" to something else and then create the link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.