Delete write protection From USB file

zyn

New Member
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
 

Neemobeer

Cloud Security Engineer
Staff member
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
 
Top