Navigation

Tutorial to Fix The Directory Name is Invalid Error on Windows 10/8/7

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?

How to Fix the Directory Name is Invalid

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.

Directory Invalid

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.

Command Invalid Directory Name

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.

Bios Invalid Directory Name

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.

Disk Error

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.

Update Drive

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:

Data Recovery

  • 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.
Download for WinDownload for Mac

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.

Scan Data

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.

Preview

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.

Recover

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.

More Reading