How to Fix ‘Invalid MS-DOS Function’ in Windows 11/10

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.

Invalid MS-DOS Function Error on Windows 11/10
Invalid MS-DOS Function Error on Windows 11/10

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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

  1. Locate the file location or folder.
  2. Right-click the name and select Rename.
    Invalid MS-DOS Function Error on Windows 11/10
    Rename File
  3. Type a shorter name and hit Enter on your computer keyboard.

2. Format the destination drive in NTFS format

  1. Open File Explorer by pressing the Windows button + E.
  2. Go to This PC and note the external drive you want to format and the letter indicated.
  3. 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.
  4. 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
  5. 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

  1. Search for CMD in the Windows search bar and select Run as administrator.
  2. Type the following command line and press Enter on your keyboard.
    Sfc /scannow
  3. Wait for the process to complete to 100%.
  4. 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

  1. Open the elevated Command Prompt or as an admin.
  2. Type the following command and press Enter.
    chkdsk /x /f /r
  3. 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

  1. Press the Windows button + E to open the File Explorer and select This PC.
  2. Locate and right-click the drive you want to optimize.
  3. Select Properties and then click Tools.
  4. Select Optimize and wait for the process to complete.
    Invalid MS-DOS Function Error on Windows 11/10
    Optimize and defragment your drive
  5. Lastly, restart your computer and see if you have resolved the Invalid MS-DOS function error.

6. Tweak Windows Registry keys

  1. Open the Run dialog by pressing the Windows button + R. Type regedit and press Enter on your keyboard.
    Follow the path below:

    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System
  2. Right-click on an empty space on the right side and select New.
  3. Click on the DWORD (32-bit Value) option.
  4. Give the value name a new name as CopyFileBufferedSynchronousIo.
  5. Next, double-click on the value and open it.
  6. Enter 1 in the Value data section and press Enter to save the changes you made.
  7. 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.

Invalid MS-DOS function error - FAQs

How do I fix invalid MS-DOS?

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.

What is MS-DOS mode?

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.

ABOUT THE AUTHOR

Raza Arshad


Raza Arshad is a certified Google IT Support Professional. With a keen eye for detail and a passion for problem-solving, he excels in identifying and resolving bugs and Windows-related issues. Armed with a deep understanding of computer systems, Raza effortlessly navigates through complexities to pinpoint the root cause and implement effective solutions. His exceptional skills in bug detection and Windows troubleshooting make him a valuable asset in any IT support team.