Sep 20, 2019 Get 'the directory name is invalid' error in Windows 10? Here, you can get the problem fixed and regain access to your data on USB flash drive, external hard drive.
If you keep getting the message said The directory name is invalid after upgrading Windows 10, it pops up once maybe every 15 minutes and interrupts what you are doing. What should you do to fix this problem?

According to Microsoft, this problem could occur when you run the command prompt program as a different user or upgrade to Windows 10. The exact causes of this problem are complicated. However, one thing is for sure that software is responsible for this problem.
In this tutorial, we are going to tell you how to get rid of the directory name is invalid error effectively.
Part 1: Overview of 'Directory Name Is Invalid' error
Generally speaking, there are two situations that directory name is invalid error may occur:
Situation 1: If you log on as one user, such as Administrator, but try to run a program as a different user, this error will pop up, especially the Command Prompt program and Notepad program.
Situation 2: Some people reported that they encountered this problem after a clean installation of Windows 10 or upgrade.
Part 2: How to Fix the Directory Name Is Invalid
Fortunately, there are several ways to fix the directory name is invalid error by your own.
Way 1: Make sure to run program with your username
As mentioned, if you use another account to run a program, it will trigger the directory name is invalid alert. The resolution is simple: change the Start in value in Properties. We use the Command Prompt program as the example.
Step 1: Click on the 'Start' menu to expand it, search for 'cmd'.
Step 2: Right-click on the Command Prompt program and choose 'Properties'.

Step 3: Change the '%HOMEDRIVE%%HOMEPATH%' in the 'Start in' box to '%WINDIR%'. Click on the 'OK' button to confirm it.
Now, try the program again, the alert should not pop up again.
Way 2: Disconnect all portable devices
We use many portable devices on your computers, like removable keyboard, mouse, storage devices and more. But they could generate some problems, like the directory name is invalid error. So, removing all portable devices from your PC and see if the problem disappears.
Way 3: Update BIOS
Updating BIOS is another way to fix the directory name is invalid error.
Step 1: Hold down 'Win + R' to open Run dialog. Input 'msinfo32' into the box and hit Enter key to start the System Information window.
Step 2: Navigate to 'BIOS Version/Date' entity and write down the manufacturer and your BIOS version.
Step 3: Then access the manufacturer website, search for the BIOS for your computer and download it. Next, all you need to do is to double click on the file to install it.
Way 4: Check disk error
If the directory name is invalid error pops up frequently when you access certain disk, maybe there is something wrong on it. The built-in error checking tool could fix it.
Step 1: Open a File Explorer and right-click on the disk that appears on the alert message.
Step 2: Choose “Properties”, head to the “Tools” tab and click the “Check” button under Error checking section.
Step 3: Next, click the “Scan drive” to start checking errors that trigger the error. Finally, click “Scan and repair drive” to fix it.
In this way, you can easily repair Windows startup.
Way 5: Up disk driver to date
Sometimes, outdated disk drivers could generate the directory name is invalid error too. You can update disk driver manually.
Step 1: Go to the 'Start' menu and open the 'Device Manager' window.
Step 2: Find and unfold the 'Disk drives' entity, then right-click on your disk and select 'Update Driver Software'. Windows is able to search for and install the latest drivers.
Notes:
1.If the directory name is invalid error happens when insert a disc into DVD drive, you should update the corresponding drivers.
2.Updating disk driver can also work when you want to fix Windows green screen of death.
Part 3: How to recover lost data When The Directory Name Is Invalid Error Occurs
The directory name is invalid error may cause data loss in some cases. That is why we recommend Apeaksoft Data Recovery. It is the best data recovery software with many useful features, like:

- Easy to use and get back lost data from your disk in one click.
- Data recovery in various situations, such as the directory name is invalid error.
- Support a variety of data types and formats, including all image, video, audio, document, email, archive and more.
- Lossless recovery and restore lost files in original conditions, format and quality.
- Preview all lost files for selectively recovery.
- It is lightweight and could restore lost files quickly and safely.
- Moreover, Data Recovery is compatible with Windows 10/8.1/8/Vista/XP and the file systems, like NTFS, FAT16, FAT32, exFAT, EXT, etc.
In short, it is the best way to get your data back when The Directory Name Is Invalid Error occurs.
How to recover lost data with Data Recovery
Step 1: Scan entire disk to look for lost data
When you discover that important data is lost due to Directory Name Is Invalid error, launch Data Recovery after installed it on your PC.
On the main interface, select the data types that you want to retrieve under the Data Type area, and choose the location to recover under Location section. Once click on the “Scan” button, Data Recovery will work automatically.
Step 2: Preview before data recovery
When going into the result window, you can look at all readable data arranged by types and formats.
For example, click on 'Image' on left side, recoverable pictures will show up in some folders titled JPG, ICO, PNG, GIF, etc.
If you want to get the photos recovery, just quickly locate a file, use the 'Filter' function at top ribbon. Plus, the Deep Scan button is able to get back more data than standard scanning.
Step 3: Recover data from Windows in one click
Recover data in one click when Directory Name Is Invalid Error happens. Tick the checkboxes next to the files that you want to recover and click on the 'Recover' button to start restoring your desired data. When it is done, you can read and edit your data as usual.
Conclusion
We save various files in different directories of our computers. So, the Directory Name Is Invalid Error is a big problem and may cause data loss. Fortunately, we can fix this problem and get our data back. Based on our guides above, you should know how to perform the solutions and fix the error. Apeaksoft Data Recovery is able to recover your data quickly and easily. We hope that our tutorial is useful to you.
Summary
Get 'the directory name is invalid' error in Windows 10? Here, you can get the problem fixed and regain access to your data on USB flash drive, external hard drive or SD card. Part 1 - 3 ways to fix the error. Part 2 - recover data with EaseUS Data Recovery Wizard.
- Part 1. Fix the Directory Name Is Invalid Error in Windows 10
- Part 2. Recover Data after Fixing 'The Directory Name Is Invalid' Error in Windows 10
Many users who did a Windows 10 upgrade reported that they have encountered 'the directory name is invalid' error while plugging their USB flash drive, external hard drive or SD card into PC.
Part 1. Fix the Directory Name Is Invalid Error in Windows 10
Being caught by this problem, they will not be allowed to open the device and access your data there. Here, you can get help no matter you want to recover data in Windows 10 or get the problem fixed:
- Notice:
- To protect data security on your USB flash drive or other storage devices, do remember to follow Part 2 for a data recovery assistance when you've removed the directly name invalid error from your Windows PC.
Method 1 - Change USB Port
When it reports 'the directory name is invalid' error in Windows 10, the first thing you can try is to re-insert or replug the external hard drive, USB or SD card via another port. Some users said changing the USB port solved the problem.
Method 2 - Check Disk Errors
If this does not work, connect the device to another computer to check if can be opened or not. If the device can not be accessed, try to check and repair disk errors in Windows 10. Otherwise, it suggests that 'the directory name is invalid' error has nothing to do with disk corruption and you have to try other ways to get the error fixed.
Method 3 - Update Disk Driver
After ruling out the possibility that 'the directory name is invalid' error appears because of USB ports issue or disk errors, we can guess that the problem might stem from disk driver. In this case, we recommend you to try to update the disk driver and check if it helps.
- Step 1: Press 'Windows + R' Key.
- Step 2: Type devmgmt.msc and press 'Enter' to open device manager.
- Step 3: Expand 'Disk Drives'.
- Step 4: Right-click on the external drive, USB or SD card driver and click on 'Update Driver Software'.
Part 2. Recover Data After Fixing 'The Directory Name Is Invalid' Error in Windows 10
If 'the directory name is invalid' error still persists or any data loss happens during the fixing process, you can try EaseUS disk data recovery software to scan the external hard drive, USB or SD card to find and retrieve your important files.
Step 1. Select a location and start scanning.
Launch EaseUS Data Recovery Wizard, hover on the partition where you lost data, then click 'Scan'.
Step 2. Preview and select the files.
Wait until the scanning completes. If you need to double-click the item to preview the file, then select the data you attempt to recover.
Step 3. Recover lost data.
Invalid Directory Or Unsupported Game Macbook Pro
Click 'Recover', choose a location to save the recovered data, then click 'OK'. You should store the data in another place instead of the original one.