PRESS RELEASE: INTERFACE ACQUIRES CENTRIQ'S CORPORATE
IT TRAINING BUSINESS - WE ARE EXPANDING!   (Jan 5, 2023)
Interface and Centriq Logos
LEARN MORE
1-800-264-9029|602-266-8500
  • Course Schedule
    • Microsoft Training
      • Microsoft Fundamentals Training
      • Windows Client
      • Teams
      • Teams / Microsoft 365 / MS365
      • Windows Server 2019
      • SQL Server Transact-SQL
      • SQL Server Administration
      • SQL Server Business Intelligence
      • Power BI
      • Power Platform
      • Azure
      • Data Engineering / Machine Learning
      • Artificial Intelligence (AI)
      • M365 Messaging
      • PowerShell
      • System Center
      • SharePoint
      • Microsoft Security
    • Cloud Computing
      • Azure
      • Amazon Cloud (AWS)
    • Developer Training
      • DevOps
      • Web Development
      • .NET Development and Visual Studio
      • Java Programming
      • Python
    • Cisco Training
      • Cisco CCNA
      • Cisco Routing and Switching
      • Cisco Security
      • Cisco Wireless
      • Cisco Data Center and Storage
      • Cisco Collaboration
      • Cisco Contact Center
      • Cisco DevNet
    • CompTIA Certification
      • CompTIA A+
      • CompTIA CASP+
      • CompTIA Linux+
      • CompTIA Network+
      • CompTIA Project+
      • CompTIA Security+
    • Business Training
      • Project Management
      • ITIL
      • NIST
      • Business Analysis (PBA & CBAP)
      • Agile
    • Security Training
      • ISC2
      • Microsoft Security
      • CompTIA Security
      • NIST
      • Cisco Security
    • Wireless Training
      • Wireless Networking
    • Other Training
      • VMware
      • F5 Networks
      • Citrix
      • Microsoft Excel
  • Exams
    • Student Pricing
  • Subscriptions
  • Interface Gold
    • RemoteLive™
    • Replay™
    • Interface Gold™ Benefits
  • On-Demand
  • Resources
    • Tech Blogs
    • Tech Videos
    • Microsoft Learn Catalog
  • About
    • Instructors
    • Interface TechPak
    • Group Training & Private Classes
    • Contact

How to Recover Locked Windows 7 Files

Home > Blogs > Windows 7 > How to Recover Locked Windows 7 Files

How to Recover Locked Windows 7 Files

Like This Blog 0 Steve Fullmer
Added by Steve Fullmer July 12, 2013

One of my Windows 7 students shared a scenario that has several possible root causes, and therefore several possible repairs.

The scenario: a program and file in use are closed. Attempts to move the file indicate that the file is still open and Windows will not allow a move or rename of the file.

Microsoft provides only modest directions for identifying and recovering locked files. Why can’t I delete a file or folder?

Although the specific program was not identified, one of the more common issues associated with Microsoft Office applications, amongst others, is the creation of temporary files that may remain if the application terminates improperly. For instance, it is always best to use the File-Close or Quit Application menu options rather than just resorting to program termination using the red “X” on the application window.

Graham Mayor provides a thorough overview for resolving file locks when Word 2002, 2007 or 2010 terminates improperly. What to do when Word crashes? The key in this instance is to locate the system temporary folder (identified by %temp%) and to remove all the associated temporary files that may result in a file lock scenario. Do not just look for folders named ‘temp’ or you may not locate the files you seek.

Using Restore Points to Recover a File

Before resorting to any manual file removal or cleanup, I strongly recommend creating a system backup or using the Windows 7 System Protection option to create a Restore Point.  Type “Restore Point” in the Start search box and select ‘Create a Restore point’.  The System Properties > System Protection panel will launch.

001-How-to-Recover-Locked-Files-in-windows-7

Prior to file deletion, Configure System Protection. You want to select Restore System Settings and Previous Versions of Files as seen below. Then Create a Restore Point.  If you accidentally delete an important file, you now have a simple means to restore it.

002-system-protection-How-to-Recover-Locked-Files-in-windows-7

If you already have restore points created, then one method to recover and unlock a file is to use of the Restore Previous File Version feature in Windows Explorer. Launch Windows Explorer and open the folder containing the locked file. Alt-Click (right mouse button) on the file and select restore Previous Versions. If you have created a restore point, and the file has been altered, you may select it from the list of available file versions.

003-previous-versions-How-to-Recover-Locked-Files-in-windows-7

Once you have selected a file, you may open it and then relocate it using the Save-As option, copy it to an alternate location, or restore it. Restoring the file may not correct all file lock situations, though is a reasonable starting point.

System Permissions

When using Windows 7, don’t forget about file permissions and the role played by User Account Control.

Even if you are a help desk technician or system administrator, if you are not the owner of a file you may not have the permission to modify, move, or delete a file when running as a standard user.  When debugging file lock problems, make certain that you launch Windows Explorer by typing ‘Windows Explorer’ in the Search box, then use Alt-Click to Run as Administrator. If you merely launch Windows Explorer from the Quick Launch bar or by selecting Computer you will be running in Standard User mode.

Once in Windows Explorer you may check the file properties for Security settings including modify permission. You may also take ownership under the Advanced Settings button though want to be extremely cautious about taking Ownership in Windows 7, since this may disrupt the creator’s permissions. If the file is encrypted, NEVER attempt to take control unless your enterprise has an encryption recovery policy in place and validated.

You can also attempt the Previous Versions of Files option for file recovery through the file Properties panel.

004-previous-versions-properties-panel-How-to-Recover-Locked-Files-in-windows-7

File permissions can also affect server side folders. Remember that file security permissions are NTFS, not Operating System, based. You will need the File Server administrator to check file permissions if a file is locked on the server side.

If a user has locked a file through improper application termination on the client side, you may still be able to acquire a copy of the file from the file server. Copy is the key concept here. You will have to assist on the client (either locally or through remote access) to clean up any local %temp% files that may be preventing file access for the client.

Task Manager

If the file is locked due to improper application termination, you may be able to clear the file lock by locating the running process within Task Manager, and ending the process tree.  Remember that you may launch multiple instances of a program as unique shells in Windows 7. Although you may be able to launch a second or third instance of Microsoft Word, for example, the locked file may be associated with process residue from an improperly terminated instance of the application. The Microsoft recommendation is to reboot the system, though we teach never to use a system reboot to solve a problem without justification. You want to do your research and confirm that a process is locking the file before rebooting. If the process is set to Auto-start or is part of a Startup group, merely rebooting the system will not resolve the problem.

While in Task Manager, you might also check to see if there are other users attached to the system. Concurrent or alternate use of the file is another cause for the file to be locked.  Merely select the Users tab within task manager. You should only see one local session, and potentially one remote session if you are using Remote Desktop or Remote Assistance to debug the file issue.

005-windows-task-manager-properties-panel-How-to-Recover-Locked-Files-in-windows-7

Process Explorer

For a more sophisticated file diagnostic tool, you want to use the Microsoft Process Explorer from Sysinternals. You want to acquire it through TechNet.

Process Explorer will enable you to thoroughly research which files, handles, and DLLs are open or locked by a specific process. Process Explorer should help you to specifically identify why a particular file is locked.

NOTE: Make sure you have permissions to install applications on the client, and that you run the installation and run the tool as an Administrator. User Account Control does not typically want a standard user implementing a tool with this capability.

The Technet download site offers several links to other tools by Mark Russinovich, the tools author, as well as an administrator’s reference that may also be useful.

Use of Process Explorer to research a file lock problem is fairly straight forward. Joe Medeiros of Javelin offers a quick overview.

Slow Process Termination and Integration Tools

One other thought before I close this blog.

Several Windows 7 applications stay resident for minutes after they are closed. Even if you close them properly. For instance, Internet Explorer may continue to run for 5 or 10 minutes after you close all the Internet Explorer Windows.

If the application incorporates add-ons, uses Windows or Microsoft Update to receive updates and patches, or integrates multiple applications, then you may have to wait several minutes before you can access files that were locked during use by the application.

For instance, I keep Evernote running on my system to capture student questions, random thoughts, or articles I find while teaching or researching. Evernote integrates with my browser, mail client, Microsoft Word and other applications. If I snapshot file content and place it into Evernote, then the file may be marked as in use even after I close the initial application. With the growing number of workflow management and cloud based solutions deployed today, you will want to assure that you close all running applications and then confirm that they are closed using Task Manager before pulling your hair out identifying how a file may be locked.

As with all good troubleshooting efforts, isolation of the issue requires eliminating as many factors as possible, and that includes properly terminating all but essential applications during the investigative and repair process.

Now, go break that file lock!
Steven Fullmer
Interface Technical Training Staff Instructor

Subscribe to this author's posts feed via RSS

You May Also Like

  • On the Topic of Mastery
    On the Topic of Mastery
  • How to use File Hashing and Integrity Monitoring Algorithms for File Validation using Certutil MD5 and WinMD5Free
    How to use File Hashing and Integrity Monitoring Algorithms…
  • Securing Your Small Office Systems
    Securing Your Small Office Systems
  • Understanding Network Cable Testers
    Understanding Network Cable Testers
Category Windows 7

Tags

%temp%, file closed but indicates still open, file lock, Previous Versions of Files, Process Explorer, System Permissions, task manager, User Account Control, Windows 7

Videos You May Like

Cable Testers and How to Use them in Network Environments

Cable Testers and How to Use them in Network Environments

0 645 1

This content is from our CompTIA Network + Video Certification Training Course. Start training today! In this video, CompTIA Network + instructor Rick Trader demonstrates how to use cable testers in network environments. Let’s look at some tools that we can use to test our different cables in our environment. Cable Testers Properly Wired Connectivity … Continue reading Cable Testers and How to Use them in Network Environments

Configuring Windows Mobility Center and How to Turn it On and Off

Configuring Windows Mobility Center and How to Turn it On and Off

1 1402 1

Video transcription Steve Fullmer: In our Windows training courses, we often share information about the Windows 8.1 Mobility Center. Mobility Center was introduced for mobile and laptop devices in Windows 7. It’s present and somewhat enhanced in Windows 8. Since we don’t have mobile devices in our classrooms, I decided to take a little bit … Continue reading Configuring Windows Mobility Center and How to Turn it On and Off

OSPF Adjacency Troubleshooting Solution – Getting Close to the OSPF adj

OSPF Adjacency Troubleshooting Solution – Getting Close to the OSPF adj

0 245 1

In this video, Cisco CCNA & CCNP instructor Mark Jacob shows how to troubleshoot OSPF Adjacency issues by showing the distance between routers with the show ip ospf neighbor command.

Write a Comment

Share your thoughts...

Please fill out the comment form below to post a reply.

Microsoft Subscription

Blogs by Technology

  • Amazon AWS (2)
  • Azure Cloud Computing (2)
  • Business Analysis (8)
  • Cisco (125)
  • CompTIA (71)
  • Developer Visual Studio / ASP.NET (62)
  • Exchange Server (47)
  • ITIL / COBIT (33)
  • Lync Server (3)
  • Office 365 (5)
  • PMP Project Management (63)
  • PowerShell (81)
  • Security (47)
  • SharePoint (93)
  • SQL Server (78)
  • System Center (13)
  • Web Development (60)
  • Windows 10 (65)
  • Windows 7 (124)
  • Windows 8 (85)
  • Windows Server (74)
  • Windows Server 2012 (90)
  • Windows Server 2016 (14)
  • Wireless (9)
  • Wireshark (5)

Blogs by Instructor

  • Dan Wahlin (44)
  • Don Jones (15)
  • Dr. Avril Salter (6)
  • Greg Richard (1)
  • Interface (49)
  • Jason Helmick (38)
  • Jeff Jones (18)
  • Jeremy Cioara (8)
  • Mark Jacob (128)
  • Mark Thomas (28)
  • Mike Danseglio (93)
  • Mike Pfeiffer (35)
  • Peter Avila (32)
  • Rick Trader (127)
  • Spike Xavier (86)
  • Steve Fullmer (163)
  • Suzanne Van Hove (1)

Blogs You May Like

  • The Easy Way to Convert Decimal Numbers to Binary Numbers and Back Again
  • Cisco CCNA and CCNP Certification Update 2019 – 2020
  • Using Command Line Utilities for Troubleshooting Name Resolution
  • What’s Up With The New Cisco Certification 2019 Program?
  • Concepts of Routing
  • Understanding Network Cable Testers

Video Courses

  • ITIL 4 Foundation Certification Video Training Course
  • Project Management Professional (PMP®) Certification Video Training PMBOK® 6th Edition
  • PMI-PBA Business Analysis for IT Analysts and Project Managers (PMI-PBA)® Certification
  • SharePoint Designer 2013 for American Express
  • CompTIA Network+ (Coming Soon!)
  • CompTIA Security+ (Coming Soon!)
  • CompTIA A+ Certification Core 1 1001 (Coming Soon)
  • CompTIA A+ Certification Core 2 1002 (Coming Soon)

Live Training Courses

  • NET+007: CompTIA Network+ Certification Training + N10- 007 Exam
  • PowerShell - 10961: Automating Administration with Windows PowerShell
  • ITIL4® Foundation Certification Course with Exam
  • AZ-100: Azure Infrastructure and Deployment Training
  • PMI-PBA: Business Analysis for IT Analysts and Project Managers (PMI-PBA Certification)
  • Cisco CCNA - ICND1v3 Interconnecting Cisco Networking Devices CCNA Part 1
  • COBIT205: COBIT® 5 Foundation and Implementation IT Governance Training
  • DEV415: Microservices with ASP.NET Core and Docker
  • IT Security - SEC+501: CompTIA Security+ with Certification Exam SY0-501
  • SQL Server - SQL101: Introduction to Transact SQL
Facebook
Twitter
Linked In
Comment
EMAIL

About Us

  • Interface Gold™ Benefits
  • Interface TechPak
  • Group Training & Private Classes

Contact Us

3115 N 3rd Ave
G130
Phoenix, AZ 85013

602-266-8500

Stay in touch on our social channels!
Twitter
Facebook
LinkedIn
State of Arizona Contract # ADSPO18-210228

Copyright © 2023 Interface Technical Training. All Rights Reserved.

Interface Live Training Terms and Conditions Terms of Use Microsoft Subscription Terms and Conditions Privacy Policy WIOA Policy

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.