Share via

Create a list of all the files that are open

Phillip Richcreek 545 Reputation points
2026-02-28T21:32:52.1366667+00:00

I want to create a list of all the files that are open before doing a restart. Does anyone know of a product that will create such a list?
Thanks.

Microsoft 365 and Office | Other
0 comments No comments

Answer accepted by question author

  1. Marcin Policht 87,735 Reputation points MVP Volunteer Moderator
    2026-02-28T22:11:44.8966667+00:00

    You don't need a separate product for this on most operating systems, since there are built-in tools that can generate a list of open files.

    On Windows, you can use Sysinternals Handle (free from Microsoft https://learn.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite ). After downloading it, run:

    handle.exe > C:\temp\openfiles.txt
    

    This will create a text file listing all open handles, including files, before you restart. You can also filter by file type if needed.

    Another built-in option on Windows is:

    openfiles /query /fo table > C:\temp\openfiles.txt
    

    Note that openfiles may require enabling local file tracking first and then rebooting once to activate it.

    If your goal is simply to know which applications are running so you can reopen them after restart, you might instead look at session restore features built into your OS or use scripting to capture running processes:

    tasklist > C:\temp\processes.txt
    

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.