5

Sometimes the update process of our application fails to rename a directory on the user's machine. Is it possible to easily find out with a standard Windows command line tool (no GUI application) which process has "open" a certain directory or file below the very directory, so we can tell the user to close that process?

Thomas S.
  • 753
  • 2
  • 13
  • 28
  • Are the computers joined into a domain, and do you have domain administrative privileges? – LPChip Nov 01 '17 at 12:56
  • 1
    I usually use Process explorer, search for the filename, and if I'm lucky, it will be an open handle by a process I have sufficient access to control. if its PID=4 though, you won't be able to do anything without a reboot. – Frank Thomas Nov 01 '17 at 16:02
  • @LPChip I don't know, but I reckon no. – Thomas S. Nov 01 '17 at 19:25

2 Answers2

8

Process Explorer from Microsoft isn't included with Windows by default but is from Microsoft and can do this. Download and install the tool from that link, run it, go to Find -> Find Handle or DLL, and enter the path to the file or directory, and it will return a list of processes with a handle to it.

erobertc
  • 593
  • 4
  • 10
0

You can use unlocker program, the easiest and fastest way, google it its free

thelordabdo
  • 21
  • 1
  • 2
  • 10
  • 1
    And it usually requires a reboot, which for the scope of this question is pointless because a reboot itself already fixes the issue. – LPChip Nov 01 '17 at 12:56