This question already has an answer here:

When I run mklink /D "C:\Users\bwilliams\AppData\Roaming\Sublime Text 2" "C:\Users\bwilliams\Dropbox\Sublime Text", I get this error `You do not have sufficient privilege to perform this operation.

Why not? I'm administrator, and just want to create a link in my own Users\bwilliams directory to another folder in my Users\bwilliams directory? What am I doing wrong here?


marked as duplicate by Der Hochstapler May 15 '15 at 15:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Hilarious. I'm trying to do the same exact thing -- sync dropbox settings on Windows -- and I'm completely stymied why creating symlinks is not a default privilege for average users. I own the source and the target, and they are both underneath my home directory. Why is this restricted?! – Mark E. Haase Apr 24 '12 at 12:57
  • 2
    I was able to do this using mklink /J instead of mklink /D. Nothing has blown up... yet... – Mark E. Haase Apr 24 '12 at 13:15
  • @mehaase Old comment, but... you can hose things with a poorly-placed junction, this is to protect from inadvertently doing that. The referenced, not at all a duplicate and I don't understand why the duplicate tag is still there today, question explains how to add that permission to a user. – EKW Aug 14 '16 at 15:19

You need to run mklink from an elevated shell (Right-click the Command Prompt shortcut, Run As Administrator).
If you are running mklink from an elevated shell, check the permissions on the directory and make sure there aren't any explicit Deny permissions set for the Administrators group.

Note: Make sure you're not trying to create a link where a directory containing files already exists, and are not accidentally creating a recursive set of links.

  • I ran it as Administrator and now it give the error Cannot create a file when that file already exists. So I deleted the Dropbox Sublime Text directory and tried it again and got the same message. Do you know what's wrong? – Ben Mar 19 '12 at 20:12
  • @Ben The error is likely about the "Dropbox Sublime Text 2" directory, which is the link name being created. Make sure there's no folder or file with that name (there could be a file if you tried it without the /D at some point). – mtone Mar 19 '12 at 21:11
  • There is no such file or directory. And the only permissions thing that I can see is that "Special permissions" are not Allowed (or Denied) for Administrators, System, or my bwilliams user account. I can't seem to figure out how to "check" special permissions. – Ben Mar 19 '12 at 21:19
  • @Ben What is the Source Directory (The real directory) and what is the Target Directory (The symbolic directory)? I think you may be entering the parameters backwards. – EKW Mar 19 '12 at 23:36
  • 3
    It turns out the directory I needed to delete was the original AppData\Roaming\Sublime Text 2 Directory. makes sense now that I did it. – Ben Mar 20 '12 at 14:03

I ran into the same problems:

At first I got this error: You do not have sufficient privilege to perform this operation

And after retrying using an elevated cmd, I ran mklink /D linkToDir C:\temp\otherLink and received this error: Cannot create a file when that file already exists.

Turns out there was a (broken?) symlink there, marked as System:

attrib *

A  S  C:\temp\linkToDir

So FYI, check that there's not a Hidden (actually System) file using that name from a previously broken symlink creation.

That is what I wanted to highlight here.


I ran into the same problem and just managed to get it working. I was trying to force itunes to backup on another (larger) drive (C is an SSD).

Say you want to go from c:\dir1\dirToRedirect to d:\dirToRedirectTo, then:

Make sure dirToRedirect does not exist, because Windows is gonna create a link of the same name, which creates a naming conflict. So, delete dirToRedirect, create dirToRedirectTo, and run mklink /j "c:\dir1\dirToRedirect" "d:\dirToRedirectTo"

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