FIX: The directory name is invalid in Windows 10

Reading time icon 16 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Key notes

  • It is important to maintain directory names when trying to access data and launching apps.
  • On that note, some users have reported a The directory name is invalid error message.
  • To solve the most common error message that you may ever meet, check out our Errors Hub.
  • Need more help fixing your PC? There's no better place to get it than our Fix section.
The directory name is invalid [Fix]

System errors such as ERROR_DIRECTORY can occur on any PC and they can prevent you from opening certain directories or files.

This error usually comes with The directory name is invalid message and today we’re going to show you how to fix it on Windows 10.

How do I fix the ERROR_DIRECTORY issue?

Fix – ERROR_DIRECTORY

1. Reinstall the audio driver

  1. Open Device Manager.
  2. Locate your DVD drive on the list, right click it and choose Uninstall device.
  3. Confirmation dialog will now appear.
  4. Click on Uninstall to remove the driver.
  5. After removing the driver, click on Scan for hardware changes icon.
  6. Windows will now scan your system and install the missing drivers.

If you’re having this problem while trying to play optical discs you might be able to fix it by reinstalling your DVD drive drivers. Once the default drivers are installed, check if the issue still persists.

Update drivers automatically (suggested)

Downloading and installing drivers manually is a process that carries the risk of getting the wrong driver installed, which may lead to serious malfunctions of your system. We strongly recommend Outbyte Driver Updater.

It automatically identifies each device on your computer and matches it with the latest driver versions from an extensive online database.

The program is almost fully automated to do the entire job for you, and with a stable Internet connection you know you’ll always have the latest drivers as soon as they appear.

More so, the UI is made to be extremely easy to understand by users of all levels, making it very accessible.

Get Outbyte Driver Updater

2. Check your antivirus

An antivirus tool is a necessity, but certain antivirus applications can cause this error to appear and prevent you from running certain apps. If you’re having this problem, we advise you to check your antivirus settings.

Sometimes certain settings can interfere with your apps and cause this and other errors to appear. To fix the problem, you need to check your antivirus settings and try disabling certain features.

If you’re not familiar with PC security, you might have some issues finding the problematic setting.

On the other hand, you might be able to solve the problem by disabling your antivirus entirely. After you disable your antivirus, check if the issue still appears. If disabling the antivirus fixes the problem, you might want to use that as a temporary workaround.

If the problem still appears, you should try uninstalling your antivirus software.

On the other hand, this would leave you exposed to malware threats, so you should try installing a better antivirus tool.

You can find very powerful antivirus software with low resource/CPU usage that will certainly not interfere with other processes or apps on your system.

3. Disable your DVD drive

  1. Press Windows Key + X to open Win + X menu.
  2. Choose Device Manager from the list.
  3. Once Device Manager opens, locate your DVD drive, right click it and choose Disable device from the menu.
  4. A warning dialog will appear.
  5. Click on Yes to confirm.
  6. Locate your DVD drive once again, right click it and choose Enable device.

Alternatively, you can re-enable your DVD drive by doing the following:

  1. Locate your DVD drive in the Device Manager and double click it.
  2. Go to Driver tab and click on Disable Device.
  3. When the warning message appears, click on Yes.
  4. Now click on Enable Device to enable your DVD drive again.
  5. Optional: Navigate to DVD Region tab and select your region from the list on the bottom.
  6. Now click on OK to save changes.

According to users, this problem usually appears when trying to play a DVD disc on your PC. To fix the problem, you need to disable your DVD drive from Device Manager and enable it again.

After enabling your device again check if the issue still persists. According to users, this is a useful solution, but unfortunately, it’s just a temporary workaround so you’ll have to repeat it every time this error occurs.

4. Connect your DVD drive to a different port

If you’re getting The directory name is invalid message while trying to play a DVD disc, you might be able to fix the problem by connecting your DVD drive to a different port. To do that you need to open your computer case and connect the DVD drive to a different SATA port on your motherboard.

After doing that, the problem should be completely resolved. Keep in mind that this solution requires you to open your computer case, so if your PC is still under warranty you might want to skip this solution.

5. Repair / remove Windows Essentials

  1. Press Windows Key + I to open the Settings app.
  2. Once the Settings app opens, go to Apps section. List of installed applications will appear.
  3. Select Windows Essentials on the list and click the Repair or Uninstall button.
  4. Follow the instructions on the screen to repair or uninstall the application.

According to users, this error can be caused by Windows Essentials. This is a useful set of tools but it has compatibility issues with Windows 10 that can cause this problem to appear.

To fix it, users are suggesting to remove or to repair Windows Essentials.  Alternatively, you can remove or repair Windows Essentials installation by doing the following:

  1. Press Windows Key + S and enter control panel.
  2. Select Control Panel from the list.
  3. When Control Panel opens, click on Programs and Features.
  4. List of installed applications will now appear.
  5. Select Windows Essentials from the list and choose the desired option from the menu on the top.
  6. Follow instructions on the screen to remove or repair the application.

Even though Windows Essentials can cause this problem to appear, you should know that other apps can cause it as well.

If you still have this problem on your PC, try removing any recently installed or updated applications and check if that solves the issue.

6. Copy the problematic file to the root directory

If you can’t run a certain application due to The directory name is invalid message, you might be able to fix the problem simply by copying the problematic file.

To do that, move the file to the root directory such as C: and try to run it from there. In some cases you might not have the necessary privileges to run files from specific locations causing this error to appear.

To fix the issue, simply move the problematic file to any root directory and the error should be fixed.

Several users also reported this problem while installing software from DVD discs.

According to them, they were unable to install the software and copying the installation files to the hard drive didn’t solve the problem.

However, after moving all files to the Program Files directory they were able to start the setup without any problems.

7. Install the latest updates

  1. Press Windows Key + I to open the Settings app.
  2. Go to Update & security section and click on Check for updates button.

Windows 10 is a great operating system, but certain bugs can cause this and other errors to occur. To fix the error, it’s advised to download the latest Windows updates.

By default, Windows 10 automatically downloads the necessary updates in the background. However, sometimes you might miss an important update by accident.

Windows will now check for any new updates. If updates are available they will be installed automatically in the background. After installing the necessary updates check if the problem still appears.

8. Remove Adobe Reader

Sometimes this problem can occur with Adobe Reader. According to users, if you have two different versions of Adobe Reader installed that can lead to certain problems including this one.

Users reported The directory name is invalid message, and according to them, you can fix the problem by removing all versions of Adobe Reader from your PC.

After doing that, you need to reinstall Adobe Reader once again and check if that solves the issue.

9. Change the drive letter

  1. Open Disk Management tool.
  2. Locate your DVD drive, right-click it, and choose Change Drive Letter and Paths.
  3. Select the drive letter and click on Change.
  4. Select the desired drive letter and click OK.

According to users, sometimes this problem can occur with your DVD drive. This error message will prevent you from burning discs, but you can fix it by changing the drive letter.

Save changes and check if the problem still persists.

10. Disable User Account Control

  1. Open Control Panel and select User Accounts.
  2. Click on Change User Account Control settings.
  3. When the User Account Control Settings window opens, move the slider all the way down.
  4. Now click the OK button to save changes.
  5. Restart your PC to apply the changes.

User Account Control is a useful security feature of Windows, but sometimes it can prevent you from installing certain applications.

This feature will prevent users and apps from making changes to the system that require administrator privileges. Thanks to it, you’ll be sure that all your applications aren’t using administrative privileges to make any system-wide changes.

Even though this feature is rather useful, in many cases User Account Control can interfere with Windows and cause The directory name is invalid message to appear while installing certain applications.

To fix the problem, it’s advised to completely disable User Account Control. After doing that, User Account Control will be disabled and you should be able to install the desired application without any problems.

Keep in mind that disabling this feature will slightly reduce your security. If you’re worried about your security, go back to User Account Control Settings and move the slider to the default position to turn this feature back on.

11. Create a Temp folder

Many applications move the necessary files during the installation to the Temp folder. This folder stores the temporary files and deletes them once you install the application.

Temp folder is necessary when installing certain apps, and if this folder is missing you might encounter this error.

According to users, they are experiencing this problem because Temp folders are missing from their PC. By default, there are two Temp folders on every computer.

The first one is located in this directory:

C:Windows

The second one is located in this directory:

C:Usersyour_usernameAppDataLocal

If any of these Temp folders are missing, you need to recreate them and check if that solves the problem. If that doesn’t help, you can try creating new Temp folders in different locations.

Before you start you need to create two folders that will work as Temp folders. After doing that you need to set environment variables by doing the following:

  1. Press Windows Key + S and enter environment.
  2. Select Edit the system environment variables.
  3. System Properties window will appear.
  4. Click on the Environment Variables button.
  5. Environment Variables window will now appear.
  6. In the User variables section select the TEMP variable and double click it to edit it.
  7. Set Variable value to the desired folder that you want to use as a Temp folder.
  8. Once you’re done, click OK to save changes.
  9. Repeat the same steps for the TMP variable and be sure to use the same folder as in the previous step.
  10. In the System variables section select the TEMP variable and double click it.
  11. Choose the desired folder that you want to use for storing temporary files.
  12. Repeat the same steps for the TMP variable and be sure to choose the same folder.
  13. Once you’re done, click OK to save changes. Restart your PC and check if the problem is resolved.

Setting up new temporary folders is an advanced procedure, so use extra caution while doing that.

12. Enter Safe Mode

  1. Open the Start Menu and click on Power button.
  2. Press and hold the Shift key and choose Restart from the menu.
  3. Choose Troubleshoot > Advanced options > Startup Settings. Click the Restart button.
  4. After your PC restarts, you’ll see a list of options.
  5. Select any version of Safe Mode by pressing the appropriate keyboard key.

This problem can sometimes be caused by your drivers or third-party applications, and the best way to fix it is to enter Safe Mode.

Safe Mode is a segment of Windows that runs with default drivers and applications, so it’s perfect for troubleshooting. To enter Safe Mode, do the following:

Once you enter Safe Mode, check if the problem still appears. If the problem doesn’t appear in Safe Mode, it’s possible that a third-party application or a bad driver is causing this error.

To fix the problem, you need to find and remove the problematic software or driver.

13. Use System Restore

  1. Press Windows Key + S and enter system restore.
  2. Choose to Create a restore point from the menu.
  3. System Properties window will now appear.
  4. Click on System Restore button.
  5. When the System Restore window opens, click on Next. A list of all restore points will appear.
  6. Check Show more restore points option if available. Select the desired restore point and click on Next.
  7. Follow the instructions on the screen to restore your PC.

If this error started appearing recently, you might be able to fix it by performing System Restore. This is a useful feature that allows you to restore your PC and fix any problems.

After restoring your PC, check if the problem still persists.

Fix – The directory name is invalid USB

1. Create a new simple drive

  1. Press Windows Key + X and click on Disk Management.
  2. Locate Unallocated space, right-click it, and choose New Simple Volume.
  3. A new window will now appear.
  4. Click on Next.
  5. Select the desired size of the volume. In most cases, it’s best to use the maximum size.
  6. After setting the volume size, click on Next.
  7. Set the desired letter for the new drive and click on Next.
  8. Choose the desired formatting options and click on Next.
  9. If you have important files on your flash drive, you might want to choose Do not format this volume option.

Sometimes this type of error can occur while trying to access a USB flash drive. According to users, you can fix this problem simply by creating a new simple drive.

After doing that, you should be able to access your flash drive without any issues.

2. Use a third party software

Several users reported this problem while trying to remove directories from their USB flash drives. According to them, it seems that directories on your USB flash drive can get corrupted and that will cause The directory name is invalid message to appear.

To fix the issue, users are recommending using IObit Unlocker application to unlock the folder and delete it, so be sure to try it out.

Get IObit Unlocker

3. Modify your registry

  1. Open Device Manager.
  2. Locate the problematic device and double click it to open its properties.
  3. Navigate to Details tab, set Property to Class Guid.
  4. Write down the value for this device because you’ll need it for future steps.
    • In our example, the value was {4d36e965-e325-11ce-bfc1-08002be10318}, but it can differ depending on the problematic device.

According to users, you might be able to fix this issue simply by changing a few values in your registry. Before you can use this solution, you need to find the ID of the problematic device.

After you find out your device’s ID, you need to find it in Registry Editor. To do that, you need to do the following:

  1. Press Windows Key + R and enter regedit.
  2. Press Enter or click OK.
  3. Optional: Before making any changes to your registry it’s advised to create a backup.
  4. To do that, simply click on File > Export. Select All as Export range, enter the desired name, and choose a safe location for the file.
  5. Now click the Save button to save it.
  6. Once Registry Editor opens, in the left pane navigate to this key and expand it:
    • HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlClass
  7. You’ll see a list of subkeys. Navigate to the key that represents the problematic device.
    • In our example it’s {4d36e965-e325-11ce-bfc1-08002be10318}, but it should be different on your PC.
  8. In the left pane, locate and delete UpperFilters and LowerFilters values.
    • To do that, simply select the problematic value, right-click it and choose Delete from the menu.

After removing the problematic values, restart your PC and check if the problem still persists. If UpperFilters or LowerFilters aren’t available, you can skip this solution since it doesn’t apply to your PC.

Fix – The directory name is invalid SD card

1. Remove your SD card

If this error message appears while using an SD card, you might want to try removing it. This is a temporary workaround, but few users reported that removing and reinserting the SD card fixed the problem for them, so be sure to try that.

2. Reinstall your drivers

According to users, this issue appears due to problems with your drivers. Sometimes issues with SD card reader drivers can occur and to fix the problem you need to reinstall the drivers.

To do that, simply navigate to Device Manager and remove your drivers. After doing that, scan for hardware changes and Windows 10 should automatically install the missing drivers.

We already showed you how to do this in one of our previous solutions, so be sure to check it out for detailed instructions.

Fix – The directory name is invalid Task Scheduler

Remove the quotes from the folder path

If you’re having this problem with Task Scheduler, it might be due to your file path. According to users, Start in (optional) field doesn’t support quotes, so if you have quotes in your file path be sure to remove them and save changes.

After doing that, the problem should be resolved and everything will start working properly.

ERROR_DIRECTORY and The directory name is invalid message usually appear while trying to install certain applications or while trying to play optical media.

This error can cause some problems on your PC, but you should be able to solve it by using one of our solutions.

More about the topics: windows 10