{"id":565,"date":"2024-07-12T10:21:47","date_gmt":"2024-07-12T17:21:47","guid":{"rendered":"http:\/\/www.icetips.com\/blog_wp\/?p=565"},"modified":"2024-07-12T10:21:47","modified_gmt":"2024-07-12T17:21:47","slug":"finding-programs-that-have-files-locked","status":"publish","type":"post","link":"http:\/\/www.icetips.com\/blog_wp\/2024\/07\/12\/finding-programs-that-have-files-locked\/","title":{"rendered":"Finding programs that have files locked"},"content":{"rendered":"<p>I recently had a situation where a program had a file or a folder locked and I had no idea what program that might be!<\/p>\n<p>I needed to restore a folder from a Macrium backup but I didn't want to just overwrite the folder, so I wanted to rename it.\u00a0 But I wasn't able to do that because some processes had a folder or file locked in there.<\/p>\n<p>After some search, I found an answer that didn't need any additional software to be installed, but rather use a tool that has been in Windows for several versions.\u00a0 The Resource Monitor!\u00a0 The answer can be found on <a href=\"https:\/\/superuser.com\/questions\/117902\/find-out-which-process-is-locking-a-file-or-folder-in-windows\">Superuser.com<\/a><\/p>\n<p>Run the Resource Monitor, then go to the CPU tab, and expand the \"Associated Handles\" panel - see the screenshot below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-566\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2024\/07\/icetips-resource-monitor.png\" alt=\"\" width=\"1405\" height=\"1225\" srcset=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2024\/07\/icetips-resource-monitor.png 1405w, http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2024\/07\/icetips-resource-monitor-300x262.png 300w, http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2024\/07\/icetips-resource-monitor-768x670.png 768w, http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2024\/07\/icetips-resource-monitor-1024x893.png 1024w, http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2024\/07\/icetips-resource-monitor-960x837.png 960w\" sizes=\"auto, (max-width: 1405px) 100vw, 1405px\" \/><\/p>\n<p>Click the checkbox next to \"Image\" at the top of the \"Processes\" list and it will select all the processes in the list.<\/p>\n<p>The \"Associated Handles\" will then fill in - it can take a few moments if there are a lot of processes running.<\/p>\n<p>You can then sort and filter the list to narrow it down to what you are looking for, see the screenshot below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-567\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2024\/07\/icetips-resource-monitor-filtered.png\" alt=\"\" width=\"1163\" height=\"857\" srcset=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2024\/07\/icetips-resource-monitor-filtered.png 1163w, http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2024\/07\/icetips-resource-monitor-filtered-300x221.png 300w, http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2024\/07\/icetips-resource-monitor-filtered-768x566.png 768w, http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2024\/07\/icetips-resource-monitor-filtered-1024x755.png 1024w, http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2024\/07\/icetips-resource-monitor-filtered-960x707.png 960w\" sizes=\"auto, (max-width: 1163px) 100vw, 1163px\" \/><\/p>\n<p>Here I have filtered it to show \"C:\\\" so it will show any files on the C:\\ drive that are locked.\u00a0 I also sorted it by the \"Handle Name\" so it is easy to find based on the path.<\/p>\n<p>You can also find services, sessions, registry keys etc., so this is a very easy way to find things.\u00a0 For more powerful options, using <a href=\"https:\/\/learn.microsoft.com\/en-us\/sysinternals\/downloads\/process-explorer\">Processs Explorer<\/a> from SysInternals\/Microsoft has more options and is also 100% free and certainly an excellent tool along with <a href=\"https:\/\/learn.microsoft.com\/en-us\/sysinternals\/downloads\/procmon\">Process Monitor<\/a>.<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_565\" class=\"pvc_stats all  \" data-element-id=\"565\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I recently had a situation where a program had a file or a folder locked and I had no idea what program that might be! I needed to restore a folder from a Macrium backup but I didn't want to just overwrite the folder, so I wanted to rename it.\u00a0 But I wasn't able to <a href=\"http:\/\/www.icetips.com\/blog_wp\/2024\/07\/12\/finding-programs-that-have-files-locked\/\" class=\"more-link\">...continue reading <span class=\"screen-reader-text\">Finding programs that have files locked<\/span><\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_565\" class=\"pvc_stats all  \" data-element-id=\"565\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[3,5],"tags":[],"class_list":["post-565","post","type-post","status-publish","format-standard","hentry","category-index","category-technical"],"_links":{"self":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/comments?post=565"}],"version-history":[{"count":1,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/565\/revisions"}],"predecessor-version":[{"id":568,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/565\/revisions\/568"}],"wp:attachment":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/media?parent=565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/categories?post=565"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/tags?post=565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}