Remove Individual Files With Write Protection
Some files, when opened, have many different modes installed, leading to an imbalanced file. For example, a file marked "read - only" cannot be deleted from the drive. Of course, there will still be errors that make you uncomfortable.
Browse to your USB drive > find the offending file > right-click and select Properties > At the bottom of the panel, under Properties, make sure Read Only is unchecked.
You should also pay attention to files with long names, even exceeding 255 characters, as many errors will occur. To be able to delete long file names, you need to perform the following steps:
You need a command prompt because Windows Terminal and PowerShell do not support the necessary DOS commands.
Here's how:
- Press Windows + R, type cmd, and press Enter or click OK.
- In the command prompt, enter the path to the folder containing the affected files and press Enter. I entered D: to navigate to our USB drive.
- Type the text dir /x and press Enter to list all the files in that directory, along with their short names. If you have a long list of files, try dir /x /p, which pauses the list to show you one screen at a time.
- Type del followed by the short name of the affected file and press Enter to delete it. Type dir WETALS~1.TXT to delete your test file.
If you're unable to delete a file due to it being locked, there are several ways to force deletion or unlock it.