my dog learned polymorphism*
The moose likes Linux / UNIX and the fly likes Finding PID of a file in Windows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Finding PID of a file in Windows" Watch "Finding PID of a file in Windows" New topic
Author

Finding PID of a file in Windows

Allan Santana
Greenhorn

Joined: Apr 28, 2007
Posts: 3
Hi,
I need to know how I can get the PID of a process that locking a file in the Windows(the same of command fuser in Linux). I need this PID to kill the process automatically and after delete this file.
Thank you very much.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

And why do you ask in the linux/unix-section?

PID in Windows lock files - didn't I get your question?


http://home.arcor.de/hirnstrom/bewerbung
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15952
    
  19

Originally posted by Stefan Wagner:
And why do you ask in the linux/unix-section?


Because Windows people don't know what the "fuser" command is?

Seriously, though, there are Windows utilities for this kind of stuff, but unlike Linux, they aren't part of either the base distro or Microsoft developer kits. I recommend Google, since I've tried to avoid using Windows enough that I no longer remember their names.

BTW, "bumping" a query (especially after only 2 hours!) isn't considered polite on JavaRanch. The way things work around here, if SOMEONE hasn't answered within a day or 2 and you're not using some sort of fictitious name, we probably don't know the answer. Fortunately, we know LOTS of answers!


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Finding PID of a file in Windows
 
Similar Threads
how to kill a process(I know the port in which it runs)
The Java Virtual Machine has exited with a code of 1, the service is being stopped.
Get the UNIX process ID of the java program
Finding PID of a file in Windows
Finding PID from file in Windows