GiliSoft File Lock Pro

Protect important files intentionally, then restore authorized access or securely remove sensitive data when it is no longer needed.

  • Lock files, folders, local drives, and removable storage
  • Remove your own protection rules with the master password
  • Securely shred selected confidential files
GiliSoft File Lock Pro for Windows file protection

How to Delete Write-Protected Files from USB, SD Card, or Disk

Updated on July 23, 2026   |   By GiliSoft Editorial Team

If Windows says a file or disk is write-protected, deletion is blocked until the read-only rule is removed. The protection may apply only to one file, or it may apply to the entire USB flash drive, SD card, external disk, or partition.

Use these steps only on files and storage devices you own or administer. Back up important data first, identify whether the restriction is file-level or device-level, and never select a disk by guesswork in DiskPart.

First, Identify What Is Write-Protected

Test a small, nonessential file on the same storage device. The result tells you where to begin.

Physical switch first: SD cards and some USB adapters have a lock switch. Move it to the unlocked position, reconnect the device, and test again before changing Windows settings.

Method 1. Remove File Write Protection in Properties

Use this method when one file is marked read-only but other files on the same drive can still be edited or deleted.

  1. Right-click the affected file and choose Properties.
  2. On the General tab, clear Read-only.
  3. Select Apply, then OK.
  4. Close any application that has the file open and try deleting it again.
  5. If Windows reports access denied, check Security > Advanced and confirm your administrator account owns the file and has the required permission.
Clear the Read-only attribute in Windows file propertiesClear the file-level Read-only attribute before retrying deletion.
Folder checkbox note: the Read-only box shown for folders does not behave exactly like a file attribute. If a folder cannot be deleted, inspect permissions, open programs, and the attributes of files inside it.

Method 2. Clear Disk Read-Only Status with DiskPart

Use DiskPart when the whole removable drive or disk is read-only. Select the disk by capacity and device identity, not by assuming a disk number.

  1. Connect the USB drive, SD card, or external disk.
  2. Search for Command Prompt and choose Run as administrator.
  3. Enter diskpart, then enter list disk.
  4. Identify the correct disk by size. Enter select disk N, replacing N with the verified disk number.
  5. Enter attributes disk to inspect the current status.
  6. Enter attributes disk clear readonly.
  7. Enter exit, reconnect the drive, and test deletion with a nonessential file.
Clear disk read-only status with DiskPartDiskPart can clear a software read-only attribute after the correct disk has been positively identified.
DiskPart can help whenWindows has applied a software read-only attribute to the selected disk.
DiskPart cannot repaira physical lock switch, failing storage hardware, controller-level protection, or an organization policy that is reapplied.

Method 3. Check the Windows WriteProtect Registry Policy

A Windows storage policy can block writes to removable media. Check this only after the physical switch and DiskPart status have been reviewed.

  1. Press Win + R, enter regedit, and open Registry Editor as an administrator.
  2. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies.
  3. If an existing WriteProtect value is present, export the key as a backup.
  4. Open the value and change its data from 1 to 0.
  5. Restart Windows, reconnect the storage device, and test it again.
Set the existing WriteProtect registry value to zeroSet an existing removable-storage WriteProtect policy value to 0 only on a computer you administer.
Do not create unrelated keys: if StorageDevicePolicies or WriteProtect is absent, the cause may be hardware failure, manufacturer software, security software, or organization policy. Do not keep adding registry entries at random.

Delete the File after Write Protection Is Removed

Once Windows allows the file to be changed, choose the deletion method that matches the data.

If the file still cannot be deleted, restart Windows to release open handles, check ownership and permissions, and review drive health. A storage device that remains read-only on several computers may be failing.

Protect Files Intentionally with GiliSoft File Lock Pro

Accidental write protection is frustrating because the source is unclear. File Lock Pro provides an explicit way to lock or protect selected files, folders, local drives, external storage, and shared folders, then remove your own rule later with the master password.

Controlled protection with a clear unlock path

Use Locking File when access should require authorization, Protecting File when changes or deletion should be restricted, and File Shredder when confidential data should be securely removed.

GiliSoft File Lock Pro box

Write-Protected File Checklist

Protect, Unlock, and Securely Remove Selected Files

Use GiliSoft File Lock Pro when you want clear, password-controlled protection instead of an unexplained read-only state.

Download File Lock Pro Trial