Jump to content
Sign in to follow this  

How to get file handles of a certain process?

Recommended Posts



I'd like to know, how to get file handles (or names) of a certain process, but not the handle of a process which is writing to a certain file.

I have a script, which starts an application for recording from tv. That application is giving a certain name to the recording, which is pre-setted and cannot been changed within the application itself. The file name is changing - according to that presets - by time, date and tuned-in tv channel. Now, I would like to let my script rename the file right after it has been closed by the recording app. Therefore, I need the path and it's name. I want to determine that information while the process of the recording app is still writing to my file, because it disappears from the list, when it's closed. When it's done, my script would know the file path and name, and could start renaming.

Is there a function (something like a "_processgetopenfiles()") to do that?

The only thing I've found till now is a commandline exe called "handle" by Microsoft. But it's not what I want. The reason is, it tells me the ID of an accessing process for a certain file only, but I need the opposite way. It should tell me all files my recording app (or another process) opened, so that I can filter the information for later using (=rename).

By the way, a DLL Struct would be enough for a start.


Edited by Zoli19721

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this