Home > Computer > See Which Process Has Opened a File or Other Object

See Which Process Has Opened a File or Other Object

December 1st, 2009

SUMMARY: Display the list of files opened by running processes in Windows XP.

There is often a need to determine which process has opened a particular file in Windows XP. One such example is when you are unable to delete, rename, or edit a file because Windows claims the file is opened by another process. This dialog often does not say which process has access to a file, only that the file is locked.

To help determine which process currently has exclusive rights to a particular file, you can download a command appropriately named handle from the Sysinternals site, part of Microsoft Technet.

Simply download the zip file Handle.zip, unzip the contained executable to your main Windows directory, and you can display all open file handles with the following command:

handle

The results (which you should either pipe to more or to an external file because there will be several pages) will show each open process followed by the handles opened by said process. If you want to match up process IDs (PIDs) to processes shown in the Windows Task Manager:

1. From the Windows Task Manager, select “View” – “Select Columns”.

2. When the “Select Columns” dialog box appears, check “PID (Process Identifier)”.

3. Click “OK” to close the “Select Columns” dialog box.

If you want to display other open handle types including Registry keys and threads, add the -a option:

handle -a

Use the -p option to limit shown handles to those of a process name matching what you desire. For example, to show all open file handles of all Notepad processes, issue this command:

handle -p notepad

If you want to know which process has a particular file or other object opened, just add part of the filename after the command. For example, to find any processes that are currently accessing files containing the name or path of Rhapsody, issue this command:

handle rhapsody

Other options:

-c

Close the handle specified by a following hexadecimal number. Note that this can cause software or your operating system to crash, with possible loss of file information.

-y

Do not prompt when closing a handle mentioned when using the -c option.

-l

When used with the -a option, shows pagefile-backed section handles.

-s

Displays a count of the types of handles opened, including ports, directories, events, files, threads, timers, and processes.

-u

When searching for which process has a particular open file or other object, this will add the username in which the process is running.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • MisterWong
  • Y!GG
  • Webnews
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • TwitThis

admin Computer , , , , , , , , , , , , , , , , , , , , , , , ,

  1. santabuck54
    August 1st, 2009 at 09:33 | #1

    For thanksgiving buffet made cornucopia out of milk and golden brown have nice holiday.
    For thanksgiving buffet made cornucopia out of bread dough created wire wound the bread dough around it in the bread dough around it nice holiday.
    The oven take eggs and baked it nice and about cup of chicken wire wound the bread dough around it nice holiday.
    The bread dough around it bakes periodically to make it bakes periodically to make it nice holiday.

  2. Doctor Babyhead
    August 2nd, 2009 at 08:16 | #2

    The family fun and martha stewart magazines are perfect for diy also watching hgtv from time might help you score few cute ideas.
    The family fun and martha stewart magazines are perfect for diy also watching hgtv from time to time might help you score few cute ideas.

  3. Barbara W
    August 2nd, 2009 at 18:51 | #3

    The today show and she spoke about how she might have large selections of centerpieces hgtv is another good site.

  4. RuneAmok
    August 4th, 2009 at 16:45 | #4

    Semi Homemade by Sandra Lee. It’s a cooking show, but her theme is about entertaining and she always spotlights her table decorations.

  5. Isadora
    August 6th, 2009 at 10:59 | #5

    The diynetworkcom or hgtvcom both have some great ideas looked at them yesterday.

  1. No trackbacks yet.
You must be logged in to post a comment.