The directory name is invalid in Windows 10

March 2023 · 15 minute read
The directory name is invalid [Fix]

XINSTALL BY CLICKING THE DOWNLOAD FILE

To fix various PC problems, we recommend DriverFix:
This software will keep your drivers up and running, thus keeping you safe from common computer errors and hardware failure. Check all your drivers now in 3 easy steps:
  • Download DriverFix (verified download file).
  • Click Start Scan to find all problematic drivers.
  • Click Update Drivers to get new versions and avoid system malfunctionings.
  • 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

  • Open Device Manager.
  • Locate your DVD drive on the list, right click it and choose Uninstall device.
  • Confirmation dialog will now appear.
  • Click on Uninstall to remove the driver.
  • After removing the driver, click on Scan for hardware changes icon.
  • 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 DriverFix.

    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 DriverFix

    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

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

  • Locate your DVD drive in the Device Manager and double click it.
  • Go to Driver tab and click on Disable Device.
  • When the warning message appears, click on Yes.
  • Now click on Enable Device to enable your DVD drive again.
  • Optional: Navigate to DVD Region tab and select your region from the list on the bottom.
  • 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

  • Press Windows Key + I to open the Settings app.
  • 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.
  • 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:

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

  • Press Windows Key + I to open the Settings app.
  • 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

  • Open Disk Management tool.
  • Locate your DVD drive, right-click it, and choose Change Drive Letter and Paths.
  • Select the drive letter and click on Change.
  • 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.

    Expert Tip: Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken. We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
    Click here to download and start repairing.

    Save changes and check if the problem still persists.

    10. Disable User Account Control

  • Open Control Panel and select User Accounts.
  • Click on Change User Account Control settings.
  • When the User Account Control Settings window opens, move the slider all the way down.
  • Now click the OK button to save changes.
  • 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:

  • Press Windows Key + S and enter environment.
  • Select Edit the system environment variables.
  • System Properties window will appear.
  • Click on the Environment Variables button.
  • Environment Variables window will now appear.
  • In the User variables section select the TEMP variable and double click it to edit it.
  • 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.
  • Repeat the same steps for the TMP variable and be sure to use the same folder as in the previous step.
  • In the System variables section select the TEMP variable and double click it.
  • Choose the desired folder that you want to use for storing temporary files.
  • Repeat the same steps for the TMP variable and be sure to choose the same folder.
  • 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

  • Open the Start Menu and click on Power button.
  • Press and hold the Shift key and choose Restart from the menu.
  • Choose Troubleshoot > Advanced options > Startup Settings. Click the Restart button.
  • After your PC restarts, you’ll see a list of options.
  • 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

  • Press Windows Key + S and enter system restore.
  • Choose to Create a restore point from the menu.
  • System Properties window will now appear.
  • Click on System Restore button.
  • When the System Restore window opens, click on Next. A list of all restore points will appear.
  • Check Show more restore points option if available. Select the desired restore point and click on Next.
  • 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

  • Press Windows Key + X and click on Disk Management.
  • Locate Unallocated space, right-click it, and choose New Simple Volume.
  • A new window will now appear.
  • Click on Next.
  • 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.
  • Set the desired letter for the new drive and click on Next.
  • 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.
  • 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

  • Open Device Manager.
  • Locate the problematic device and double click it to open its properties.
  • 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.
  • 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:

  • Press Windows Key + R and enter regedit.
  • Press Enter or click OK.
  • 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.
  • Once Registry Editor opens, in the left pane navigate to this key and expand it:
    • HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlClass
  • 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.
  • 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.

    ncG1vNJzZmivmaOxsMPSq5ypp6Kpe6S7zGigp66RobalecOiqZ6bpKS%2FunnNmqSeZw%3D%3D