The Directory Name Is Invalid | 5 Best Ways To Fix

“The Directory Name is Invalid” is an error that prevents you from opening certain directories or files. The directory name is not valid also prevents you from accessing storage devices like external hard drives, SD cards, DVDs, USB flash drives, etc. 


The below-listed ways will allow you to fix this issue and access your files and drives. You are then required to backup files afterward to prevent data loss if you encounter the directory name is invalid sd card error.

See also: 0xc00d36c4 Error Code | Top 5 Fixes [2021]

Fixes For The “Directory Name Is Invalid” Error

Below are the best ways to fix the directory name is invalid error.

Method 1 Disable And Re-Enable DVD Drive

  1. Click-on WIN + X and select Device Manager from the device manager
  2. Expand DVD/CD ROM drives, right-click your drive and select the option of Disable Device.
  3. Click Yes to confirm that you want to disable the DVD drive.disable
  4. Repeat Step 1 to find your DVD drive and enable it.
  5. Alternatively, you can also try to repair or remove Windows Essentials.
  6. Go to Start > Settings > Apps > Windows Essentials, click-on the Repair/Uninstall button to start the process.

Method 2 The Directory Name is Invalid  then Plug Your Device With A Different USB Port

When you plug in the SD card, USB, or and external hard drive onto your computer and try to clean install Windows 10 or upgrade the computer from a previous version to Windows 10, you may encounter the error “the directory name is invalid USB”.

plug usb

The reason for this is that you have inserted your device onto a dead USB port. The simplest fix for the sd card directory name is invalid error is that you can try to plug in your device with a different USB port.

Method 3 The Directory Name is Invalid  then Create A New Simple Partition With Unallocated Space

This error related to the directory name may occur while accessing a USB drive or other external storage devices. Another simple fix that works, in this case, is by creating a new simple partition with unallocated space. 

  1. Press WIN + R to open the Run window, type diskmgmt. msc in the box and press OK to open the Disk Management window.
  2. Right-click on the unallocated space and select New Simple Volume.unallocated space the directory name is invalid
  3. Follow the instructions on the pop-up New Simple Volume Wizard and finish the rest of the steps. This will create a new simple partition onto the space previously unallocated.
  4. Try accessing your device again after doing steps 1-3 to fix the  error.

See also: Driver WUDFRd Failed To Load Error | Fix in 3 Easy Ways

Method 4 Check Disk Errors

The system hard disk itself may be the cause of windows 10 the directory name is invalid problem sometimes. To check whether it is indeed the cause or not, use the Disk Check feature in Windows to scan the drives. The feature can scan and fix both the internal and the external drives by performing the following steps. 

  1. Press Windows Button + E to open the File Explorer and go to This PC.check disk the directory name is invalid
  2. Go to any Local Disk, right-click on its icon, and select the directory name is invalid
  3. After the properties window opens up, under the Tools tab, click the Check button in the Error Checking slot. (This requires permission from the Administrator)
  4. Click the Scan Drive option.scan drive
  5.  Scan the Drive for any errors, and you can choose to fix those in case any errors show up. Once the errors are fixed, restart your computer to solve the directory name is invalid error.

Method 5 Protecting Your Files On Windows 7/8/10

The error will prevent you from accessing the SD card, external or internal hard drive, USB flash drive, DVD, etc., and consequently the files on these devices.

protect folders

To avoid this problem, create a backup for your important files or folders and save them to a safe place. Use an extra external storage device or an extra computer itself. Alternatively, you can also use backup and restore software built specifically for such purposes.

See also: We Couldn’t Complete The Updates Undoing Changes | [Fixed]


The above steps will allow you to fix the “Directory Name is Invalid” error, and having a backup of files beforehand will prevent the loss of data in case of any mishap. Hope it helped you out in fixing the directory name is invalid error!

See also: Windows 10 Won’t Boot Error | Best 4 Fixes

Recommended For You