GiliSoft File Lock Pro

Control when protected files can be opened, changed, removed from protection, or securely shredded after they are no longer needed.

  • Lock or protect selected files, folders, and drives
  • Restore authorized access with the master password
  • Securely shred sensitive files after protection is removed
GiliSoft File Lock Pro for protected files

How to Delete Protected Files in Windows 11/10/8/7

Updated on July 23, 2026   |   By GiliSoft Editorial Team

A protected file may refuse deletion because it is marked read-only, owned by another Windows account, stored on a write-protected USB device, encrypted with EFS, currently locked by software, or still open in another program. The correct fix depends on which protection is active.

Use the methods below only for files and storage devices you own or administer. Start with the least invasive check, keep a backup of important data, and confirm that the file is no longer needed before deleting it.

First, Identify Why the File Is Protected

Read the exact Windows message before changing settings. It usually points toward the protection source.

Method 1. Clear Read-Only and Check File Permissions

The read-only attribute does not always block deletion by itself, but clearing it is the simplest first check. If Windows still reports access denied, verify ownership and permissions.

  1. Right-click the file and choose Properties.
  2. On the General tab, clear Read-only when it is selected.
  3. Choose Apply, then try the deletion again.
  4. If access is still denied, open Security > Advanced and confirm that your administrator account owns the file and has Full control.
  5. Close any program that may still have the file open.
If the file is in use: restart Windows and try again before changing ownership. This often releases temporary file handles without modifying security settings.

Method 2. Remove USB Drive or SD Card Write Protection

When every file on a removable device refuses changes or deletion, the device itself may be write-protected.

  1. Check the physical lock switch on the SD card or USB adapter and move it to the unlocked position.
  2. Reconnect the device and test a nonessential file.
  3. If Windows still reports write protection, press Win + R, type regedit, and open Registry Editor as an administrator.
  4. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies.
  5. If the WriteProtect value exists, back up the key and set its value data to 0, then restart Windows.
Important: if the registry path or value does not exist, do not invent unrelated keys. The device may be failing, controlled by organization policy, or protected by manufacturer software.

Method 3. Decrypt a File Protected with Windows EFS

EFS-encrypted files must be decrypted by an authorized Windows account with access to the original encryption certificate.

  1. Sign in with the Windows account that encrypted the file.
  2. Right-click the file or parent folder and choose Properties.
  3. Select Advanced on the General tab.
  4. Clear Encrypt contents to secure data.
  5. Apply the change, confirm the file opens normally, then delete it if appropriate.
Works whenThe correct Windows profile and EFS certificate are available.
Does not replace recoveryChanging permissions cannot decrypt EFS data when the required certificate is missing.

Method 4. Remove GiliSoft File Lock Pro Protection

If you locked or protected the item with File Lock Pro, restore authorized access inside the same application before deleting it.

Unlock first, delete second

Use the master password to remove the lock or protection rule. After the file is accessible, delete it normally or use File Shredder when it contains sensitive information that should not remain recoverable.

GiliSoft File Lock Pro box
  1. Open File Lock Pro and enter the master password.
  2. Choose Locking File if the item cannot be opened, or Protecting File if changes and deletion are blocked.
  3. Select the file, folder, or drive in the protection list.
  4. Choose Unlock or Unprotect, then remove the item from the list when appropriate.
  5. Verify the file is accessible in Windows Explorer before deleting or shredding it.

Method 5. Clear Read-Only, System, and Hidden Attributes with Command Prompt

Command Prompt can clear file attributes when File Explorer cannot apply the change. It does not decrypt EFS data or bypass third-party protection.

  1. Search for Command Prompt and choose Run as administrator.
  2. Enter attrib -r -s -h "C:\path\file.ext", replacing the sample path with the actual file.
  3. Press Enter and check the file properties again.
  4. Close applications using the file, then retry deletion in File Explorer.
Clear protected file attributes with Command PromptThe attrib command clears read-only, system, and hidden attributes from a file you administer.
Use the exact path: quote paths that contain spaces and verify the target before running any command. Attribute changes do not recover missing encryption keys or remove active software locks.

Part 2. Delete the File after Protection Is Removed

Once the file opens normally and Windows allows changes, choose the deletion method that matches the sensitivity of the data.

Move an unprotected file to the Recycle BinUse normal deletion when recovery may still be useful; choose secure shredding for confidential data.

Protected File Deletion Checklist

Manage and Securely Remove Protected Files

Use GiliSoft File Lock Pro to lock, protect, unlock, monitor, encrypt, or securely shred selected files from one Windows application.

Download the Official Trial