Sometimes, you might get the invalid file handle error when trying to rename, delete or copy files on Windows 10/11. Do you come up with any solution to solve it? Take it easy! In this post from MiniTool Solution, you can find some easy and effective workarounds.
Invalid File Handle
When you are attempting to create or rename a file or folder with some Windows reserved words like CON, PRN, AUX, NUL, LPT, and more, you will be prompted by the specific device name is invalid error message. Then, if you change to its file name, it will prevent your operation with interrupted action invalid file handle. Fortunately, it is easy to delete the problematic file or folder with the solutions mentioned below. Scroll down to get more details!
How to Fix Invalid File Handle on Windows 10/11?
Fix 1: Delete the File in Safe Mode
When you fail to delete the file in the normal mode, you can consider removing it in Safe Mode. This is a diagnostic mode that only starts your operating system with a minimal set of drivers and services so as to narrow down the root cause of the problem. Here’s how to do it:
Step 1. Press Win + R to open the Run box.
Step 2. In the Boot tab, tick Safe boot and Minimal.
Step 3. Click on Apply & OK to make the changes effective.
Step 4. Then, your computer will require a reboot to enter Safe Mode. After entering safe mode, open File Explorer to locate the file and delete it.
Fix 2: Delete the File via Command Prompt
If there are multiple problematic files or folders, you can utilize some command lines in Command Prompt to remove the folder and all the files inside it. To do so:
Step 1. Run Command Prompt as an administrator.
Step 2. In the command window, type the following command and don’t forget to hit Enter. Here, you need to replace file-folder-path with the path of your problematic file or folder.
rd \\.\file-folder-path /S /Q
- The rd command is used to delete the directory or folder.
- The \\. command will select the computer you are currently using.
- The /S command can delete all the sub-directories and files that contains in the specified folder.
- The /Q command helps to remove everything without any confirmation message.
If the invalid file handle when copying files error is still there, you can run either of the following commands in an elevated Command Prompt:
FSUTIL reparsepoint delete C:\Users\<username>\Desktop\FileName
DEL C:\Users\<username>\Desktop\FileName
Suggestion: Back up Crucial Files to Avoid Mistaken Deletion
At times, you might delete some files by mistake. What’s more, Windows will require you to permanently delete some big files when you intend to remove them. What can you do if you want to recover them?
In this case, things will be much easier if you have a backup copy of your important files. Speaking of backup, a piece of free Windows backup software called MiniTool ShadowMaker is a top recommendation.
This powerful tool is designed to back up and restore files, folders, selected partitions, the Windows system, and even the whole disk. Now, follow these steps to create a file backup with it:
Step 1. Launch MiniTool ShadowMaker Trial Edition for free.
MiniTool ShadowMaker TrialClick to Download100%Clean & Safe
Step 2. In the Backup page, go to SOURCE > Folders and Files to select the files you need to protect.
Step 3. Then, go to DESTINATION to pick a storage path to store the backup image. Here, an external hard drive or USB flash drive is more preferred.
Step 4. Click on Back Up Now to start the process right now.
Final Words
This post introduces 2 ways to delete your files when encountering invalid file handle. Meanwhile, it is strongly recommended to back up anything important on your computer with MiniTool ShadowMaker. Hopefully, they can work for you.