Ever try to delete, move, or rename a file only to get a Windows system warning with something like one of these messages?

  • "Cannot delete file: Access is denied"
  • "There has been a sharing violation"
  • "The source or destination file may be in use"
  • "The file is in use by another program or user".
  • "Make sure the disk is not full or write-protected and that the file is not currently in use"

One of the best ways to handle locked files or folders is to use the free Microsoft program Process Explorer. The program has been described in another article and here is how to use it to find out what program, DLL, or handle is using a file or folder. You will need to run as administrator.

How to find out what program is using a file

In Windows 7 or 8, the system message may tell you what program is using the file. If it doesn’t or if you are using Windows XP, there is a simple way to find the program:

  1. Open Process Explorer, running as administrator.
  2. On the toolbar, find the gunsight icon on the right (shown highlighted in the figure shown below).
  3. Drag the icon and drop it on the open file or folder that is locked.
  4. The executable that is using the file will be highlighted in the Process Explorer main display list.

How to find out which handle or DLL is using a file

  1. Open Process Explorer, running as administrator.
  2. Enter the keyboard shortcut Ctrl+F. Altenatively, click the “Find” menu and select “Find a Handle or DLL”.
  3. A search dialog box will open.
  4. Type in the name of the locked file or other file of interest. Partial names are usually sufficient.
  5. Click the button “Search”,
  6. A list will be generated. There may be a number of entries.
  7. An individual handle in the list can be killed by selecting it and pressing the delete key. However, care is necessary when deleting handles, as instabilities may occur. Often, just rebooting will free a locked file.

Process Explorer can be downloaded here.

A related article is Best Free Undeletable File Remover

Get your own favorite tip published! Know a neat tech tip or trick? Then why not have it published here and receive full credit? Click here to tell us your tip.

原文:http://www.techsupportalert.com/content/how-find-out-which-windows-process-using-file.htm

找出文件正在被哪个windows进程使用的方法的更多相关文章

  1. 使用top工具,找出消耗CPU 较多的进程

    1.使用top工具,找出消耗CPU 较多的进程 [oracle@cuug ~]$ top top - 10:48:27 up 23:15,  4 users,  load average: 1.09, ...

  2. 【Linux】找出文件之间的差异

    使用命令comm可以找出2个文件之间的差异 现在有文件如下: Linux:/qinys # cat A.txt apple lemon onion orange pear Linux:/qinys # ...

  3. indexOf() 如何判断一个元素在指定数组中是否存在? 找出指定元素出现的所有位置? indexOf()方法 是正序查找,lastIndexOf()是倒叙查找

    indexOf()方法返回在数组中可以找到一个给定元素的第一个索引,如果不存在,则返回-1. let a = [2, 9, 7, 8, 9]; a.indexOf(2); // 0 a.indexOf ...

  4. 一起来刷《剑指Offer》-- 题目一:找出数组中重复的数字(Python多种方法实现)

    数组中重复的数字 最近在复习算法和数据结构(基于Python实现),然后看了Python的各种"序列"--比如列表List.元组Tuple和字符串String,后期会写一篇博客介绍 ...

  5. windows 进程间通讯方法

    Windows平台为我们提供了多种进程间通信的机制,主要包括:注册表方式.共享文件方式.共享内存方式.共享数据段.映射文件方式.管道方式. 剪贴板方式.消息方式.其中注册表方式需要增加注册表表项,而注 ...

  6. windows进程的创建方法

    1.WinExec(LPCSTR lpCmdLine,UINT uCmdShow) >>参数: lpCmdLine:指定程序的相对路径或绝对路径,命令行参数 uCmdShow:指定窗口的显 ...

  7. Windows找出占用端口的进程

    第一步:找出监听指定端口的进程号: C:\> netstat -ao | findstr 443  TCP    0.0.0.0:443            Sean-NotePC:0     ...

  8. java:找出占用CPU资源最多的那个线程(HOW TO)

    在这里对linux下.sun(oracle) JDK的线程资源占用问题的查找步骤做一个小结:linux环境下,当发现java进程占用CPU资源很高,且又要想更进一步查出哪一个java线程占用了CPU资 ...

  9. java:找出占用CPU资源最多的那个线程

    linux环境下,当发现java进程占用CPU资源很高,且又要想更进一步查出哪一个java线程占用了CPU资源时,按照以下步骤进行查找: 1.先用top命令找出占用资源厉害的java进程id,如: 2 ...

随机推荐

  1. Java学习笔记(八):集合类

    Java中对数据的存储会使用到集合类,下面我们来看看Java中常用的集合类. Collection接口 集合的接口,可以简单的理解为可以动态扩充的数组. Collection接口定义了很多相关的方法, ...

  2. The plot Function in matlab

    from http://pundit.pratt.duke.edu/wiki/MATLAB:Plotting The plot Function The plot function is used t ...

  3. DBMS_LOB

    1.LOB背景 在现在的系统开发中,需要存储的已不仅仅是简单的文字信息,也包括一些图片.音像资料或者超长的文本,这要求后台数据库具有存储这些数据的能力,Oracle通过提供LOB对象实现了该功能. 2 ...

  4. CDOJ 1251 谕神的密码 贪心

    谕神的密码 Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.uestc.edu.cn/#/problem/show/1251 Descr ...

  5. c# 路径空格---ProcessStartInfo参数问题

    今天在整合程序的时候,要从一个程序转到另一个程序 当然要使用:   ProcessStartInfo startInfo = new ProcessStartInfo("\\Program ...

  6. java 对象序列化

    java 对象序列化 package org.rui.io.serializable; import java.io.ByteArrayInputStream; import java.io.Byte ...

  7. javascript获取鼠标位置

    首先不同浏览器中event位置属性的分析: 1. IE的event.x,event.y是以事件触发元素的父元素外界为参考点(不包括滚动距离) 2. Firefox的event.pageX,event. ...

  8. CentOS5.6 安装RabbitMQ

    步骤参考官方地址:http://www.rabbitmq.com/install-rpm.html我们这个版本按照官方的不能正确安装. 1.安装erlang(官网地址http://www.erlang ...

  9. hive-安装MySQL(centos6.4)

    为安装hive做准备,以前装过无数次,在线的.tar包的,一直不用忘得差不多了. centos6.4 虚拟机 先看有没有装,有的话应该是自带的,卸载就可以了 命令分别是 然后在线安装,命令是 (-y是 ...

  10. B. Painting Pebbles

    B. Painting Pebbles time limit per test 1 second memory limit per test 256 megabytes input standard ...