The directory name is invalid [Fix]

Milan Stanojevic avatar. By: Milan Stanojevic
14 minute read
the-directory-name-is-invalid-error

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 Patented Technologies (requires upgrade).

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 to fix ERROR_DIRECTORY error?

Fix – ERROR_DIRECTORY

Solution 1 – Disable your DVD drive

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. To do that, follow these simple steps:

  1. Press Windows Key + X to open Win + X menu. Choose Device Manager from the list.
  2. Once Device Manager opens, locate your DVD drive, right click it and choose Disable device from the menu.
  3. A warning dialog will appear. Click on Yes to confirm.
  4. 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. Now click on OK to save changes.

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.

Solution 2 – 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.

Solution 3 – Repair / remove Windows Essentials

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. To do that, follow these steps:

  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. Select Windows Essentials on the list and click the Repair or Uninstall button.
  3. Follow the instructions on the screen to repair or uninstall the application.

Alternatively, you can remove or repair Windows Essentials installation by doing the following:

  1. Press Windows Key + S and enter control panel. Select Control Panel from the list.
  2. When Control Panel opens, click on Programs and Features.
  3. List of installed applications will now appear. Select Windows Essentials from the list and choose the desired option from the menu on the top.
  4. 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.

Solution 4 – 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.

Solution 5 – Install the latest updates

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. To check if your version of Windows is up to date, do the following:

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

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.

Solution 6 – Reinstall the audio driver

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. To do that, follow these simple steps:

  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. Click on Uninstall to remove the driver.
  4. After removing the driver, click on Scan for hardware changes icon. Windows will now scan your system and install the missing 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 Tweakbit’s Driver Updater tool. It automatically identifies each device on your computer and matches it with the latest driver versions from an extensive online database.

Here is how it works:

    1. Download and install TweakBit Driver Updaterdriver updater starting window
    2. Once installed, the program will start scanning your PC for outdated drivers automatically. Driver Updater will check your installed driver versions against its cloud database of the latest versions and recommend proper updates. All you need to do is wait for the scan to complete.
      tweakbit driver updater scanning drivers windows
    3. Upon scan completion, you get a report on all problem drivers found on your PC. Review the list and see if you want to update each driver individually or all at once. To update one driver at a time, click the ‘Update driver’ link next to the driver name. Or simply click the ‘Update all’ button at the bottom to automatically install all recommended updates.
      Automatically Update complete
      Note: Some drivers need to be installed in multiple steps so you will have to hit the ‘Update’ button several times until all of its components are installed.

Disclaimer: some features of this tool are not free.

Solution 7 – 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.

Solution 8 – Check your antivirus

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.

Some antivirus tools tend to leave behind certain registry entries and files even after you uninstall them, so you’ll need to remove those files as well. The best way to do that is to use a dedicated removal tool for your antivirus. All major antivirus companies have these tools for their software, so be sure to download one for your antivirus.

After removing your antivirus, check if the issue still appears. If removing the antivirus fixes the problem, you need to consider switching to a different antivirus software or updating your antivirus to the latest version.

Solution 9 – Change the drive letter

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. To do that, follow these steps:

  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.

Save changes and check if the problem still persists.

Solution 10 – Disable User Account Control

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. To do that, follow these steps:

  1. Open Control Panel and select User Accounts.

  2. 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 Patented Technologies (requires upgrade).

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

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.

Solution 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 C:Windows directory.

The second one is located in C:Usersyour_usernameAppDataLocal directory.

If any of these Temp folders is missing, you need to recreate it and check if that solves the problem. If that doesn’t help, you can try creating new Temp folders on 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. Select Edit the system environment variables.
  2. System Properties window will appear. Click on Environment Variables button.
  3. Environment Variables window will now appear. In the User variables section select TEMP variable and double click it to edit it.
  4. Set Variable value to the desired folder that you want to use as a Temp folder. Once you’re done, click OK to save changes.
  5. Repeat the same steps for TMP variable and be sure to use the same folder like in the previous step.
  6. In System variables section select TEMP variable and double click it. Choose the desired folder that you want to use for storing temporary files. Repeat the same steps for TMP variable and be sure to choose the same folder.
  7. 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.

Solution 12 – Enter Safe Mode

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:

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

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.

Solution 13 – Use System Restore

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. To use this feature you need to do the following:

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

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

Fix – “The directory name is invalid” USB

Solution 1 – Create a new simple drive

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. To do that, follow these steps:

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

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

Solution 2 – Use IObit Unlocker

Several users reported this problem while trying to remove directories from their USB flash drive. 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 to use IObit Unlocker application to unlock the folder and delete it, so be sure to try it out.

Solution 3 – Modify your registry

According to users, you might be able to fix this issue simply by changing few values in your registry. Before you can use this solution, you need to find the ID of the problematic device. This is somewhat simple and you can do it by following these steps:

  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. 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.

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. Press Enter or click OK.
  2. Optional: Before making any changes to your registry it’s advised to create a backup. 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. Now click the Save button to save it.
  3. Once Registry Editor opens, in the left pane navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlClass key and expand it.
  4. 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.
  5. 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

Solution 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.

Solution 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

Solution – 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.

Editor’s Note: This post was originally published in September 2017 and has been since revamped and updated for freshness, accuracy, and comprehensiveness. We want to be sure that our list has the best products that will fit your needs.

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 Patented Technologies (requires upgrade).

Discussions

Next up

Mozilla adds alerts about recently breached sites into Firefox browser

Giles Ensor avatar. By: Giles Ensor
3 minute read

Firefox has announced that it will start to warn users if they visit any breached sites. This is in an attempt to not only make […]

Continue Reading

More uncertainty for Microsoft’s Windows 10 October Update

Giles Ensor avatar. By: Giles Ensor
3 minute read

Oh dear. It’s been a pretty bad month for Microsoft concerning its Windows 10 October 1809 Update release. Microsoft eventually released the update a couple […]

Continue Reading

Confirmed: Microsoft now accepting ARM64 apps on its Store

Giles Ensor avatar. By: Giles Ensor
2 minute read

Yesterday, Microsoft released Visual Studio 15.9. With it came the announcement that “developers now have the officially supported SDK and tools for creating 64-bit ARM […]

Continue Reading