如果在全新安装 Windows 11/10甚至升级到更新版本的 Windows 11/10 后,您遇到错误消息The directory name is invalid when you insert a disc in CD/DVD drive,那么这篇文章可能会对您有所帮助。

此错误的主要原因似乎是设备驱动程序损坏、过时或不兼容,但也可能是由于SATA端口损坏或故障引起的。
目录名无效
如果您看到目录名称无效(The directory name is invalid)消息,您可以尝试我们推荐的解决方案,看看是否有助于解决问题。
- 更改 SATA 端口
- 检查磁盘是否有错误
- 禁用然后重新启用DVD驱动器
- 删除所有便携式设备
- 卸载 DVD 驱动器驱动程序
- 更改CD/DVD Drive
- 更新磁盘驱动程序。
让我们看一下关于列出的每个解决方案所涉及的过程的描述。
1]更改SATA端口
此解决方案需要您尝试更改插入CD/DVDSATA端口。为此,您需要打开您的PC/Laptop Case,因此强烈建议您寻求合格的硬件技术人员的服务。
2]检查磁盘是否有错误
要运行 CHKDSK,请执行以下操作:
按Windows键 + R 调用“运行”(Run)对话框。
在“运行”对话框中,键入cmd,然后按CTRL + SHIFT + ENTER以在管理员模式下打开命令提示符(open Command Prompt in admin mode)。
在命令提示符窗口中,键入以下命令并按 Enter。
chkdsk /x /f /r
您将收到以下消息:
Chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? (Y/N).
按键盘上的Y键,然后重新启动计算机,让CHKDSK 检查并修复(CHKDSK to check and fix)计算机硬盘上的错误。
CHKDSK完成后,检查问题是否已解决。
3]禁用(Disable)然后重新启用DVD驱动器
请执行下列操作:
- 按Windows键 + X 打开高级用户菜单(Power User Menu),然后按M键打开设备管理器(open Device Manager)。
- 展开 DVD/CD-ROM 驱动器,然后右键单击您的DVD驱动器并选择 禁用。(Disable.)
- 现在,一旦设备再次被禁用,右键单击它并选择 启用。(Enable.)
重新启动您的 PC 并查看 目录名称无效( The directory name is invalid )错误是否已解决。
4]删除所有便携式设备

请执行下列操作:
- 打开设备管理器。
- 单击 查看(View) ,然后选择 显示隐藏的设备。(Show hidden devices.)
- 展开 便携式设备(Portable Devices),然后右键单击所有便携式设备,然后选择删除。(elete. )确保(Make)删除便携式设备下列出的所有设备。
- 重新启动您的 PC 以保存更改。
在启动时,检查问题是否已解决。如果没有,请尝试下一个解决方案。
5]卸载DVD驱动器驱动程序
请执行下列操作:
- 打开设备管理器。
- 展开 DVD/CD-ROM 驱动器,然后右键单击您的DVD驱动器并选择 卸载。(Uninstall.)
- 单击Yes/Continue 确认。
- 重新启动(Reboot)您的 PC,驱动程序将自动安装。
检查问题是否已解决。否则,请尝试下一个解决方案。
6]更改(Change)CD/DVD Drive的驱动器号
请执行下列操作:
- 按Windows key + X,然后选择磁盘管理。(Disk Management.)
- 在列表中找到您的CD/DVD驱动器,该驱动器将被写入CD ROM 0/DVD drive.
- 右键单击它并选择更改驱动器号和路径。(Change Drive Letter and Paths.)
- 现在在下一个窗口中单击 更改按钮。(Change button.)
- 现在将驱动器号(Drive)更改为下拉列表中的任何其他字母。
- 单击确定(Click OK)并关闭磁盘管理(Disk Management)窗口。
- 重新启动您的 PC 以保存更改。
检查问题是否已解决。如果没有,请继续下一个解决方案。
读取(Read):CD 或 DVD 驱动器不工作或无法读取。
7]更新磁盘驱动程序
执行以下操作(Do the following):
- 打开设备管理器。
- 展开磁盘驱动器(Disk Drives)。
- 右键单击(Right-click)外部驱动器、USB或 SD 卡驱动程序,然后单击更新驱动程序软件(Update Driver Software)。
之后,检查目录名称无效(The directory name is invalid)问题是否仍然存在。如果是这样,请尝试下一个解决方案。
Any of these solutions should work for you!
The directory name is invalid - CD/DVD error on Windows 11/10
If after a clean install of Windows 11/10 or even upgrading to a newer version of Windоws 11/10 and you encounter error message The directory name is invalid when you insert a disc in CD/DVD drive, then this post may help you.

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.
- Change SATA Port
- Check disk for errors
- Disable and then re-enable the DVD drive
- Delete all Portable Devices
- Uninstall the DVD drive drivers
- Change the drive letter of CD/DVD Drive
- Update disk drivers.
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.
chkdsk /x /f /r
You will receive the following message:
Chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? (Y/N).
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!