The main cause of this error seems to corrupt, outdated, or incompatible device drivers, but it can also be caused because of damaged or faulty SATA port.

The directory name is invalid

If you see The directory name is invalid message, you can try our recommended solutions and see if that helps to resolve the issue. Let’s take a look at the description of the process involved concerning each of the listed solutions.

1] Change SATA Port

This solution entails that you try changing the SATA port in which your CD/DVD drive is plugged into. In order to do this, you will need to open your PC/Laptop Case, so it’s highly recommended that you seek the services of a qualified hardware technician.

2] Check disk for errors

To run CHKDSK, do the following: Press Windows key + R to invoke the Run dialog. In the Run dialog box, type cmd and then press CTRL + SHIFT + ENTER to open Command Prompt in admin mode. In the command prompt window, type the command below and press Enter. You will receive the following message: Press the Y key on the keyboard and then reboot your computer to let CHKDSK to check and fix the errors on the computer hard drive. After CHKDSK completes, check to see if the issue is resolved.

3] Disable and then re-enable the DVD drive

Do the following:

Press Windows key + X to open the Power User Menu, then press M key to open Device Manager.Expand DVD/CD-ROM drives then right-click on your DVD drive and select Disable.Now once the device is disabled again right-click on it and select Enable.

Reboot your PC and see if  The directory name is invalid error is resolved.

4] Delete all Portable Devices

Do the following:

Open Device Manager.Click View then select Show hidden devices.Expand Portable Devices then right-click on all Portable Devices one by one and select Delete. Make sure to delete all the device listed under Portable Devices.Reboot your PC to save changes.

On boot, check if the issue is resolved. If not, try the next solution.

5] Uninstall the DVD drive drivers

Do the following:

Open Device Manager.Expand DVD/CD-ROM drives then right-click on your DVD drive and select Uninstall.Click Yes/Continue to confirm.Reboot your PC and the drivers will be automatically installed.

Check if the issue is resolved. Else, try the next solution.

6] Change the drive letter of CD/DVD Drive

Do the following:

Press Windows key + X then select Disk Management.Locate your CD/DVD drive in the list which would be written as CD ROM 0/DVD drive.Right-click on it and select Change Drive Letter and Paths.Now in the next window click on Change button.Now change the Drive letter to any other letter from the drop-down.Click OK and close the Disk Management window.Reboot your PC to save changes.

Check if the issue is resolved. If not, continue with the next solution. Read: CD or DVD drive not working or not reading.

7] Update disk drivers

Do the following:

Open Device Manager.Expand Disk Drives.Right-click on the external drive, USB or SD card driver and click on Update Driver Software.

Afterward, check if The directory name is invalid issue persists. If so, try the next solution. Any of these solutions should work for you!

The directory name is invalid   CD DVD error on Windows 11 10 - 22The directory name is invalid   CD DVD error on Windows 11 10 - 84