📎 AI Summary:
The thread discusses issues with permanently deleting a file from a USB drive, which remains protected or locked despite attempts like removing attributes and booting into SafeMode. The original poster seeks advice on resolving this problem. Respondent Neemobeer explains multiple possible causes, such as open processes, file permissions, physical write protection on the USB, or volume attributes, and offers detailed troubleshooting steps for each, generally indicating that with proper checks and tools, the problem can be resolved. The overall tone is helpful and technical, aiming to guide the original poster through common causes of file deletion issues.

zyn

New Member
Joined
Oct 3, 2022
Messages
1
Thread Author #1
I've been trying to remove File protection from a file from a USB and then delete it for a little while now

I Tried.



Removing disk attributes from the USB

Starting up in SafeMode

Delete The File From Command Prompt.




Still Can Not Delete the File.



If anyone knows how to help me out with this problem I will be appreciative
 

Solution
A file could be unremovable for a number of reasons.
  • A process has a file opened with exclusive access
  • You don't have proper access to the file
  • The USB drive has a physical 'read-only' switch
  • The USB is mounted as 'read-only'

For the first item, you can use a tool such as procexp to locate any handles to the file in question and kill the process

For number two you would need to right-click the file > properties and look in the security tab to verify you have sufficient privileges to the file to delete it.

In the third bullet, you would inspect the device itself and verify if it has a switch, if so make sure it is not in the write-protect toggle

For the last item, you can use use the built-in diskpart utility to...

Neemobeer

Windows Forum Team
Staff member
Joined
Jul 4, 2015
Messages
8,995
A file could be unremovable for a number of reasons.
  • A process has a file opened with exclusive access
  • You don't have proper access to the file
  • The USB drive has a physical 'read-only' switch
  • The USB is mounted as 'read-only'

For the first item, you can use a tool such as procexp to locate any handles to the file in question and kill the process

For number two you would need to right-click the file > properties and look in the security tab to verify you have sufficient privileges to the file to delete it.

In the third bullet, you would inspect the device itself and verify if it has a switch, if so make sure it is not in the write-protect toggle

For the last item, you can use use the built-in diskpart utility to confirm the USB disk and volume are not 'read-only'

Diskpart:
To launch, simply type diskpart at a command or Powershell prompt

list disk will show you available disks
list vol will show you available volumes

You will need to select the correct disk (this will be apparent by the size) which one is the USB then type
select disk # and select vol # (should be identifiable by the LTR assigned

Run the commands detail disk and detail vol and look at the read-only attributes to confirm they say no
 

Solution