Fix: “Cannot create the file” error on Windows 10

By: Milan Stanojevic
4 minute read

For various PC problems, we recommend this tool.

This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues now in 3 easy steps:

  1. Download this PC Repair Tool rated "Excellent" on TrustPilot.com.
  2. Click “Start Scan” to find Windows issues that could be causing PC problems.
  3. Click “Repair All” to fix all issues with Patended Technologies (requires upgrade).

Every day we access and create all sorts of different files, but sometimes certain issues with files can appear. Users reported that they are getting Cannot create the file error message on Windows 10, and today we’re going to show you how to fix it.

“Cannot create the file”, how to fix it?

Fix – “Cannot create the file” right click the folder

Solution 1 – Change your registry

According to users, this error occurs when you don’t have the necessary permissions over Temporary Internet Files folder stored on a server. Due to this problem you won’t be able to open or save an email attachment, but you should be able to fix this problem by making certain changes to your registry. Modifying the registry can be potentially dangerous if you don’t do it properly, therefore we recommend that you use extra caution and create a backup of your registry before making any changes. To edit your registry, do the following:

  1. Press Windows Key + R and enter regedit. Click OK or press Enter.
    cannot-create-the-file-regedit-1
  2. When Registry Editor opens, in the left pane navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Security\.
  3. In the right pane double click OutlookSecureTempFolder.
  4. In the Value Data field enter C:\temp0\ and then click OK.
  5. After making these changes, close Registry Editor and restart your PC.

After your PC restarts, check if the problem is resolved. This solution should work for all modern versions of Outlook, although the path in Step 2 might change a bit depending on the version that you’re using.

Alternative way to fix this problem is to create a new registry key for OutlookSecureTempFolder. You can do that by following these steps:

  1. Open Registry Editor and navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Security\ key in the left pane.
  2. Locate OutlookSecureTempFolder in the right pane and rename it to OutlookSecureTempFolder__Old.
  3. In the right pane, right click the empty space and choose New > String Value. Enter OutlookSecureTempFolder as the name of the new string.
    cannot-create-the-file-regedit-2
  4. Double click OutlookSecureTempFolder and change the Value Data to %USERPROFILE%\Documents\OutlookTempFiles\. Click OK.
  5. Now go to %USERPROFILE%\Documents\ in and create OutlookTempFiles folder there.
  6. Restart your PC, start Outlook again and check if the problem is resolved.

If you’re still having issues on your PC or you simply want to avoid them for the future, we recommend you to download this tool (100% safe and tested by us) to fix various PC problems, such as file loss, malware and hardware failure.


For various PC problems, we recommend this tool.

This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues now in 3 easy steps:

  1. Download this PC Repair Tool rated "Excellent" on TrustPilot.com.
  2. Click “Start Scan” to find Windows issues that could be causing PC problems.
  3. Click “Repair All” to fix all issues with Patended Technologies (requires upgrade).

Solution 2 – Empty Outlook Secure Temp folder

This problem can affect almost any version of Outlook, and in order to fix this problem, you need to remove all files from Outlook Secure Temp folder. You can do that by following these steps:

  1. Open Registry Editor and navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Security key in the left pane. This path might be a bit different depending on the version of Outlook that you’re using.
  2. Open OutlookSecureTempFolder in the right pane to see its properties.
  3. Copy the file location from Value Data field and paste it into File Explorer’s address bar.
  4. After you open that folder, delete all files from it.

If checking the registry and removing these files is too complicated for you, you can also use tools such as OutlookTempCleaner and OutlookTools to quickly and easily empty Outlook Secure Temp folder.

Fix – “Cannot create the file” when that file already exists

Solution 1 – Check your syntax

Users reported this error while trying to create a link using the mklink command. This command can be quite useful, but in order to use it, you need to be sure that your syntax is correct. If your syntax is wrong, you’ll most likely get Cannot create the file error message. If you’re using mklink command, be sure to use the following syntax: mklink [options] [Link] [Target].

Solution 2 – Move the files from link to the target folder

As we already explained in our previous solution, mklink syntax should look like this: mklink [options] [Link] [Target]. To fix this problem you need to move the files from the Link directory to the Target directory manually. After that, delete the Link folder and try to run the command again. Bear in mind that deleting certain directories can lead to problems, therefore it might be better that you just rename them.

Solution 3 – Delete Tvsuinstaller directory

Users reported this error while trying to install system updates, and apparently you can fix this problem on Lenovo laptops by removing one directory. Simply go to C:\ProgramData\Lenovo\ and delete the Tvsuinstaller folder. After deleting it, try to perform system update again.

Cannot create the file error usually occurs when you try to view Outlook attachments, or if you’re making links on your PC, but as you can see, this problem can be easily solved by using one of our solutions.

READ ALSO:

For various PC problems, we recommend this tool.

This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues now in 3 easy steps:

  1. Download this PC Repair Tool rated "Excellent" on TrustPilot.com.
  2. Click “Start Scan” to find Windows issues that could be causing PC problems.
  3. Click “Repair All” to fix all issues with Patended Technologies (requires upgrade).

Next up

Best Windows 10 antivirus software to use in 2018

By: Radu Tyrsina
7 minute read

Update – 2018 will soon come to an end and we already have a guide on what is the best antivirus you should get in […]

Continue Reading

These features are out for good with Windows 10 version 1809

iamsovy@gmail.com' By: Sovan Mandal
2 minute read

Microsoft is all set to launch its next big update, Windows 10 version 1809 in October. While that should be a nice piece of news […]

Continue Reading

Windows 10 18H2 builds no longer receive new features

By: Matthew Adams
3 minute read

The Windows 10 October 2018 Update (otherwise 18H2) rollout might now be two to three weeks away. For the last few months, new build previews […]

Continue Reading

Discussions