Windows 10: "Cannot create a file when that file already exists" error when creating an mklink

Discus and support "Cannot create a file when that file already exists" error when creating an mklink in Windows 10 Ask Insider to solve the problem; Hello, I've been trying to create an mklink so that anything inside of the documents folder on the C drive is actually stored on the F drive. Trouble... Discussion in 'Windows 10 Ask Insider' started by /u/TurningRhyme467, Feb 21, 2020.

  1. "Cannot create a file when that file already exists" error when creating an mklink


    Hello, I've been trying to create an mklink so that anything inside of the documents folder on the C drive is actually stored on the F drive. Trouble I'm having is that it says it cannot create a file when that file already exists, which is confusing considering I have no files in that folder to begin with.

    This is the command I'm using to get that error:

    mklink /D "C:\Users\User\Documents" "F:\Documents"

    If I swap the paths around, it then works, but the files are stored on the C drive regardless, which defeats the point of me doing all this in the first place.

    I need to be able to store them on the F drive, but can able to access them via the C drive and file explorer shortcuts.

    How do I go about doing that? Is it safe to delete the default documents folder perhaps?

    submitted by /u/TurningRhyme467
    [link] [comments]

    :)
     
    /u/TurningRhyme467, Feb 21, 2020
    #1
  2. mldardy Win User

    Cannot create a file when that file already exists error message

    I get this message when I try to change windows 10 update download location. The steps I performed were:


    1. Stop wuauserv in Task Manager > Services tab.
    2. Rename C:\Windows\SoftwareDistribution to C:\Windows\OldSoftwareDistribution
    3. Create new folder on external harddrive: D:\WindowsUpdateLocation
    4. Open command prompt - Run as administrator and type in mklink /j c:\windows\softwaredistribution d:\WindowsUpdateDownload and hit enter.

    I get 'Cannot create a file when that file already exists' . What am I doing wrong here? It should say Junction created for C:\Windows\OldSoftwareDistribution <<=>> D:\WindowsUpdateLocation but I get the error message instead.
     
    mldardy, Feb 21, 2020
    #2
  3. Creating Shortcuts with Batch File

    Hmm, I just tried it and it worked fine. Maybe try running the batch as administrator? Also, right click on the desktop after the shortcut is created and click Refresh.

    If the file in the third parameter doesn't exist, it assumes the icon is in the application.
     
    FordGT90Concept, Feb 21, 2020
    #3
  4. Flava0ne Win User

    "Cannot create a file when that file already exists" error when creating an mklink

    Creating Shortcuts with Batch File

    I've created a Batch file which calls on the following VB Script to be able to create a shortcut to my desktop:

    VB Script (named createLink.vbs):
    Code: set objWSHShell = CreateObject("WScript.Shell") set objFso = CreateObject("Scripting.FileSystemObject") ' command line arguments ' TODO: error checking sShortcut = objWSHShell.ExpandEnvironmentStrings(WScript.Arguments.Item(0)) sTargetPath = objWSHShell.ExpandEnvironmentStrings(WScript.Arguments.Item(1)) sWorkingDirectory = objFso.GetAbsolutePathName(sShortcut) set objSC = objWSHShell.CreateShortcut(sShortcut) objSC.TargetPath = sTargetPath objSC.WorkingDirectory = sWorkingDirectory objSC.Save[/quote] Batch File Example (for Windows Notepad):
    Code: @echo off cscript createLink.vbs "C:\Users\Administrator\Desktop\Notepad.lnk" "C:\Windows\System32\notepad.exe"[/quote] But after creating the shortcut using this method, I'm not able to assign a custom icon for the shortcut. I get the following error message when trying to do so:


    "Cannot create a file when that file already exists" error when creating an mklink Error503.jpg


    Any help and ideas on what I need to put into the VB Script and/or Batch File to be able to do this would be greatly appreciated! *Big Grin "Cannot create a file when that file already exists" error when creating an mklink :D

    Also, I know that I can simply do this by going to Start Menu\All Programs\Accessories\ right-clicking on Notepad and selecting Send to\Desktop (create shortcut). Easy enough for creating a single shortcut. But I need to create several multiple shortcuts and using this Batch/VBS method would really save me a lot of time in doing so.
     
    Flava0ne, Feb 21, 2020
    #4
Thema:

"Cannot create a file when that file already exists" error when creating an mklink

Loading...
  1. "Cannot create a file when that file already exists" error when creating an mklink - Similar Threads - Cannot create file

  2. Cannot create a file when that file already exists - error during Group Policy processing

    in Windows 10 Gaming
    Cannot create a file when that file already exists - error during Group Policy processing: I have various GPOs assigned to machines running Windows 11 22H2 with the latest cumulative update. All machines get the GPOs, but some are experiencing errors as follows:EventData SupportInfo1 1 SupportInfo2 5213 ProcessingMode 0 ProcessingTimeInMilliseconds 713203 ErrorCode...
  3. Cannot create a file when that file already exists - error during Group Policy processing

    in Windows 10 Software and Apps
    Cannot create a file when that file already exists - error during Group Policy processing: I have various GPOs assigned to machines running Windows 11 22H2 with the latest cumulative update. All machines get the GPOs, but some are experiencing errors as follows:EventData SupportInfo1 1 SupportInfo2 5213 ProcessingMode 0 ProcessingTimeInMilliseconds 713203 ErrorCode...
  4. mklink cannot create file already exists

    in Windows 10 Network and Sharing
    mklink cannot create file already exists: Just ran into a ""we can't sign into your account" problem due to some unnecessary update that has clearly messed up my registry. Anyway, I have gone down the duplicating and restoring to a new account. Again one step forward and three back. I heavily rely in mklinks They are...
  5. mklink cannot create file already exists

    in Windows 10 Gaming
    mklink cannot create file already exists: Just ran into a ""we can't sign into your account" problem due to some unnecessary update that has clearly messed up my registry. Anyway, I have gone down the duplicating and restoring to a new account. Again one step forward and three back. I heavily rely in mklinks They are...
  6. mklink cannot create file already exists

    in Windows 10 Software and Apps
    mklink cannot create file already exists: Just ran into a ""we can't sign into your account" problem due to some unnecessary update that has clearly messed up my registry. Anyway, I have gone down the duplicating and restoring to a new account. Again one step forward and three back. I heavily rely in mklinks They are...
  7. "The file or folder does not exist" when creating a folder

    in Windows 10 Ask Insider
    "The file or folder does not exist" when creating a folder: Hello, I had a mklink folder created in my Dropbox folder. It was My Documents folder. I since removed it and I want to create a folder called Documents in my Dropbox folder. When I try to create this folder I get ""The file or folder does not exist" error and then a folder...
  8. Cannot create a file when that file already exists

    in Windows 10 Support
    Cannot create a file when that file already exists: I've been trying for hours to get this working, but it keeps giving me the same error. I'm not an expert with computers and windows. This is what i've been entering: mklink /d "C:\Program Files (x86)\Steam\steamapps\sourcemods" "D:\sorce" Please help. 156254
  9. Cannot create a file when that file already exists error message

    in Windows 10 Support
    Cannot create a file when that file already exists error message: I get this message when I try to change windows 10 update download location. The steps I performed were: 1. Stop wuauserv in Task Manager > Services tab. 2. Rename C:\Windows\SoftwareDistribution to C:\Windows\OldSoftwareDistribution 3. Create new folder on external...
  10. "File Exists" Error When Creating New Folder in Explorer

    in Windows 10 Support
    "File Exists" Error When Creating New Folder in Explorer: Got an odd one for you: A user is in File Explorer, right-clicks, and tries to create a new folder. She gets an error that says File Exists. There is already a folder called New Folder in the folder that she's currently in. As well as a New Folder (2), New Folder (3) etc....

Users found this page by searching for:

  1. mklink error cannot make when file already exists