The Directory Name is Invalid | 4 Effective solutions

Portable storages such as external hard drives, SD cards, and USB drives, are very resourceful to transfer files from one computer to another, especially photos and videos. But if there are problems with the storage drive or the USB port, you will come across “The Directory Name is Invalid” Error on your Windows 10 computer.

There are multiple ways in which you can fix the errors and access data from the drive. Continue reading the writeup to learn about the different ways to fix the error

What is “The Directory Name is Invalid”

The directory name is invalid is an error code that usually blocks you from accessing your external storage device. The error code message usually occurs because you've plugged your external devices in the dead USB port.

Can I fix “The Directory Name is Invalid Error”?

Yes, you can fix “The directory name is invalid error”. Usually, when you come across this error, it means either there is a problem with the input drivers on your computer or the SD card is corrupted.

However, you can overcome this error by updating the driver or by fixing the corruption in the SD card/ USB. Follow the troubleshooting steps one after the other to fix invalid directory error on Windows 10 computer.

Caution: By trying out the repair steps you will definitely get rid of the error. But this fix can come at a cost as you might lose all your precious files, photos, and videos on the card. Therefore, recover the data even before starting the repair process. However, if you are unable to open the drive and access the data. Click on the download button below to recover the data from an inaccessible USB, SD card, external storage device.


How to Fix “The Directory Name is Invalid Error”

  1. Connect the Drive to Another Port
  2. Try Connecting the Drive to a Different Computer
  3. Update the Disk Driver on the Computer
  4. Run CHKDSK Command to Fix Corruption in SD card

Connect the Drive to Another Port

Every computer will have additional USB ports to connect and accommodate other peripheral devices. If you are seeing “The Directory Name is Invalid” error after connecting the flash drive or memory card, remove and reconnect the drive to another port.

Sometimes the storage drive could work flawlessly on a different port. It is one of the simplest solutions to overcome the error and access data.

Try Connecting the Drive to a Different Computer

After trying and connecting the drive to all the ports, if you are still facing the same error. Try accessing the SD card by connecting it to another computer.

This will also give an idea of whether the problem is with the storage drive or the connecting port.If you were able to access the drive on a different system, it means there was a problem with the previous computer or its ports.

Update the Disk Driver on the Computer

From the previous step, if you find out that the problem is with the USB port, you would have to update the disk driver. Updating the drive will help you resolve the “ the directory name is invalid” error. Here is what you need to do

  • Open the Start menu and type Device Manager in the search box
  • Now, expand the Disk drives option
  • Next, right-click on the drive and select the Update driver option. This will ensure that the driver gets updated.

After updating the driver, try connecting the SD card back onto the computer. This time you will be able to access the drive and its data.

Run CHKDSK Command to Fix Corruption in SD card

If the drive is not recognized or shows the same error on a different computer, turns out that the storage drive is corrupted.In which case you would have to fix the corruption to be able to access data.

You can fix the drive using an inbuilt utility i.e the CHKDSK command. Here is how you can find and fix corruption on an external storage drive.

  • Press the Windows+R keys simultaneously to open the Run window.
  • Next, type cmd in the search box and press the Enter.
  • Next, copy and paste the code chkdsk e: /r /f in the command line. (replace ‘e’ with the drive letter, as represented on your computer for the storage )
  • Now, press Enter to initiate the repair process
  • The CHKDSK will scan for any corruption on the SD card and fix the logical disk errors
  • Once the corruption is fixed, you can successfully open the drive and access the data


You also need to note that this CHKDSK command will not work all the time. Sometimes your SD card can get corrupted even more, after running the CHKDSK command. If you are stuck in this situation, you might have to recover data from SD card using a data recovery tool.

A corrupted SD card is very fragile to handle. The chance of losing your favorite photos and videos is very high when you try to access the data. Hence, you need to use a trusted tool such as Remo Photo Recovery software to retrieve files without losing the data.

The tool is powered by a deep scan algorithm that scans every sector of the inaccessible drive to retrieve the data. The tool successfully recovers data from any portable devices such as external hard drives, flash drives, and memory cards. Download and try the software for free now.


Recover Data from Storage Devices with Directory Name is Invalid error

Download and install the Remo Hard Drive Recovery Software and follow the below the steps

  • From the main screen click on Recover Files and choose the external drive to be recovered
  • After choosing the drive click on Scan to start the recovery process
  • Once the recovery is done double-click on the recovered files to Preview them
  • Finally, click on Save and provide a location to save the recovered files


Make sure to follow all instructions carefully while performing the fix. The safest and the recommended way would be to recover the data from the SD card before trying out the troubleshooting step. If you still have any doubts or queries regarding the solution, kindly mention in the comment section below.

The Directory Name is Invalid | 4 Effective solutions was last modified: October 26th, 2021 by Molly Owen

Leave a Reply

Your email address will not be published. Required fields are marked *