How to Unlock a File Before Renaming?

Windows doesn’t allow you to rename, move or delete locked files. If you’re trying to rename a file that is locked, you will see one of the following error messages on your screen:

  • This action can’t be completed because the folder or a file it contains is open in another program.
  • This action can’t be completed because this file is open in <Application Name>. Close the file and try again.
  • There was a problem renaming this file
  • You’ll need permission to perform this operation. You require permission from the computer’s administrator to make changes to this folder.

Identify and Group Similar Looking Photos

Use PictureEcho’s intelligent algorithm to clean up photos collection and save disk space.

Case 1: A Program is Using Your File

If the error message displays a specific application for the error, close it. Also, look for the system tray icon in the notification area. Right-click it and select Exit.

Case 2: Terminate Processes Using Your File

The simplest way to fix this issue is to identify the underlying program or process using your file. Terminating such a program or process will resolve your issue.

  1. Download Microsoft’s Process Explorer.
  2. Run the version compatible with your system type. For example, if you’re running a 64-base operating system, run the 64-bit version (procexp64.exe), or launch the 32-bit version (procxp.exe).
  3. Click on File > Find a handle or DLL.
  4. Type name of the locked file you’re unable to rename and then click on the Search button.
  5. Microsoft Process Explorer will display a list of programs or processes using your locked file. Choose your file and press the Delete key to terminate it.

Case 3: Disable Third-Party Startup Programs from Using the File

Some programs running after the Windows boot interval may have caused this issue. Avoid running all third-party startup applications except your Antivirus and security software and check if the problem still persists. You may use the Task Manager to disable your startup items.

  1. Right-click on the Taskbar.
  2. Select Task Manager.
  3. Click on More details.
  4. Click on the Startup tab.
  5. Right-click a startup application you want to disable.
  6. Select the Disable option.
  7. You will need to restart your computer once.

Case 4: Your File is Corrupted

Your file is a piece of electronic data. The data is stored in a structured format. When the contents of your file are changed in an incorrect manner owing to some damage to your hard disk or other reasons, the file becomes unreadable. If you’re unable to rename your file, it may be possible that your file is corrupted and unmovable.

Perform the System File Checker to identify and resolve bad sectors on your hard drive.

  1. Double-click on This PC icon on your Desktop.
  2. Right-click the partition containing your file (for example, D:\).
  3. Select Properties.
  4. Click on Tools > Check.
  5. Click on Scan Drive and follow the on-screen instructions.

Case 5: Your Computer is Infected by a Malware

Viruses and malware can often lock your files. If a virus or malware is consistently using a file or locking it from being used, you may want to run an antivirus scan.

Case 6: There are File Permission Issues

If your computer is being used by multiple users, file permission issues could occur while renaming a file originally created by another user on the same PC. Sign in from the original user account that created the file and grant the required permissions.

  1. Right-click on your Start button.
  2. Select Shut down or sign out > Sign out.
  3. Click the account that originally created the file you want to rename.
  4. Enter the password, if required.
  5. After signing in, right-click your file and select Properties.
  6. Click on the Security tab.
  7. Click on Advanced.
  8. In the Permissions tab, double-click the user account where you’re trying to rename the file.
  9. Check-up the Full control option and click on Close.
  10. Click on OK > OK.

Alternatively, you can simply rename the file by signing in to the original user account.

Case 7: The File has a Read-Only Attribute

It may be possible that the file you’re trying to rename is read-only. Remove the Read-Only attribute to fix this issue.

  1. Right-click your file, select Properties.
  2. In the General tab, uncheck the Read-only checkbox.
  3. Click on OK.

Case 8: You’re trying to Rename a Protected OS File

You may be trying to rename a protected operating system file. Therefore, Windows is preventing you from altering the operating system files for security issues. It is highly recommended that you DO NOT unlock and rename such protected operating system files.

Case 9: Your File is Locked by Antivirus Software

The file you’re trying to rename may be locked by your Antivirus and security software. Temporarily disable your Antivirus software or exclude the file from real-time protection to resolve this issue.

AVG Antivirus:

To disable your Antivirus, right-click its system tray icon in the Notification Area of your Taskbar, and set the Protection to OFF.

To exclude the file from real-time protection, double-click the AVG Antivirus icon in the system tray. Click on Menu > Settings. Select the Exceptions tab. Click on Add Exception and select your file. 

Securely Rename Files with One-Click (Recommended)

The simplest way to securely rename your files is by using Easy File Renamer. Easy File Renamer is a batch renaming tool that includes a variety of file renaming criteria to choose from. It lets you add text to file names, remove or replace text, add prefix or suffix, add numbering to your files, swap characters, convert to upper/ lower case, and more. You can choose one or more renaming patterns depending on your needs.

  1. Download Easy File Renamer.
  2. Click on Add Files.
  3. Select a rule from the drop-down box on the left. For example, to convert all file names to the lower case, select the Lower Case option and then click on Add Rule.
  4. You may add more rules if required.
  5. Once you’re done, click on Rename and your files will be renamed immediately.

Vikas

Vikas is a technology enthusiast who loves writing articles on computers and technology. He writes on various topics related to software, software reviews, troubleshooting and tips & tricks to make people's digital lives better.