What is an Invalid MS-DOS function?
The Invalid MS-DOS function error occurs when you try to delete, move, rename, or copy folders or files from one storage drive to another on Windows 11 or Windows 10. The issue is mainly caused by corrupted files or if you are trying to transfer a file or folder from a FAT32 format drive to an NTFS-format drive or vice versa. The problem is a file-system issue and only affects how the file functions.
This article will focus on why the Invalid MS-DOS function error occurs on your PC, and suggest working solutions to fix the issue. So, if you are one of the users facing this error, continue reading through to see which fix will work for your case.
How Do I Fix the Invalid MS-DOS Function Error on Windows 11/10?
If you are encountering the Invalid MS-DOS function error when copying, deleting, or moving a file from one drive to another, click Try Again on the error message, or restart your computer. Such simple workarounds can resolve the problem. If that doesn’t work, try the following solutions to successfully fix the issue.
- Rename the file name. Sometimes, if the name of the file you are copying, moving, or deleting is too long, you might get the Invalid MS-DOS function error. To fix this, you need to rename the file using a shorter name and see if the issue is fixed.
- Format the destination drive in NTFS format. If you are copying or transferring a file to a drive that is not formatted in NTFS (New Technology File System), format it into this format and see if you have resolved the error, or convert the drive to NTFS.
- Repair system files using SFC & DISM. System files might be corrupted, missing, or outdated and trigger the Invalid MS-DOS function. To fix this, you need to scan your entire system using SFC and DISM tools. These tools will detect and repair these files automatically or give you a notification of what you need to do.
- Run the CHKDSK command. CHKDSK check if the files on your drive are safe. It also examines the disk use and space and gives the status report for each file. This can help you know the issue with your drive and if the file you working on has some issues.
- Optimize and defragment your drive. If you optimize and defrag your drive, it means it will take a shorter time to read your files. It can also resolve many other issues including the Invalid MS-DOS function.
- Tweak Windows Registry keys. Making some changes in the system policy using Registry Editor can fix the issue. However, this should be the last resort solution. Some users have reported to have successfully fixed the error by tweaking the Windows Registry.
1. Rename the file name
- Locate the file location or folder.
- Right-click the name and select Rename.
- Type a shorter name and hit Enter on your computer keyboard.
2. Format the destination drive in NTFS format
- Open File Explorer by pressing the Windows button + E.
- Go to This PC and note the external drive you want to format and the letter indicated.
- Next, press the Windows button + R, type cmd in the Run dialog box, and press Ctrl + Shift + Enter to open Command Prompt as an administrator.
- Type or copy and paste the following command line (Replace drive with the actual letter that represents the drive on This PC) and hit Enter:
convert drive: /fs:ntfs
- Try to copy, delete, or move the file and see if you resolve the Invalid MS-DOS function error.
3. Repair system files using SFC & DISM
- Search for CMD in the Windows search bar and select Run as administrator.
- Type the following command line and press Enter on your keyboard.
- Wait for the process to complete to 100%.
- If you get an error or the issue is still occurring, run the following DISM commands, each at a time:
DISM.exe /Online /Cleanup-image /Scanhealth
DISM.exe /Online /Cleanup-image /Restorehealth
4. Run the CHKDSK command
- Open the elevated Command Prompt or as an admin.
- Type the following command and press Enter.
chkdsk /x /f /r
- You might get an error indicating that chkdsk cannot run because the volume is in use by another process…, press Y on your keyboard to allow your PC to boot and chkdsk scan your drive.
5. Optimize and defragment your drive
- Press the Windows button + E to open the File Explorer and select This PC.
- Locate and right-click the drive you want to optimize.
- Select Properties and then click Tools.
- Select Optimize and wait for the process to complete.
- Lastly, restart your computer and see if you have resolved the Invalid MS-DOS function error.
6. Tweak Windows Registry keys
- Open the Run dialog by pressing the Windows button + R. Type regedit and press Enter on your keyboard.
Follow the path below:
- Right-click on an empty space on the right side and select New.
- Click on the DWORD (32-bit Value) option.
- Give the value name a new name as CopyFileBufferedSynchronousIo.
- Next, double-click on the value and open it.
- Enter 1 in the Value data section and press Enter to save the changes you made.
- Finally, restart your PC and see if the issue has been fixed.
Warning: Making any changes in the Windows Registry can lead to unresolvable issues for your computer. We recommend creating a system restore point and then proceeding with caution. We cannot guarantee that issues that result in wrong registry edits can be resolved.
That’s it for now. We hope you resolved the Invalid MS-DOS function error.
We believe one of the solutions worked for you. However, in an unlikely situation, if you are still experiencing the error, you can contact Windows help for further individual-level assistance. Alternatively, you can leave us a message in the comment section, and one of our experts will get back to you as soon as possible.
Invalid MS-DOS function error - FAQs
To fix the Invalid MS-DOS function error while copying, deleting, moving, or renaming a file on Windows 11 or Windows 10, create and configure the CopyFileBufferedSynchronousIo key on Windows Registry Editor. You can also run the CHKDSK command or use a third-party tool to fix the system-file error.
MS-DOS stands for Microsoft Disk Operating System and it is also widely referred to as Microsoft DOS. It is a command-based interface and single-tasking OS used to navigate, manipulate, or open files or folders using a command line as compared to GUI.