PsFile
Command-line tool for viewing and closing open files, including those accessed via network shares.
Publisher: Microsoft Corporation
Country of Origin:
United States
Official Website: https://learn.microsoft.com/en-us/sysinternals/downloads/psfile
Description
A command-line utility for viewing and closing open files on a system, including files opened remotely via network shares.
PsFile is a Windows command-line utility in the Sysinternals PsTools family used to enumerate and manage files that are open on a system, with particular emphasis on files opened through remote connections such as SMB network shares. It can display information about active file handles associated with remote sessions—helpful for diagnosing “file in use” conditions, tracking which clients have a file locked, and auditing access patterns on file servers. PsFile supports targeting the local machine or a remote computer, and can be used to close specific open-file instances to release locks and disconnect access when necessary. Common administrative scenarios include resolving blocked file operations, managing shared-folder usage, and investigating which users or computers are accessing particular shared resources.
Because closing an open file handle can disrupt applications and risk data loss if writes are pending, it is typically used with administrative privileges and with operational caution.