Home XP Commands
XP Syntax

PsFile (part of PsTools - download PsFile)

Show files opened remotely, or close an open file (kill file locks)

Syntax
      psfile [\\Computer [-u User [-p Passwd]]]  [[Id | path]  [-c]]

Options:

   computer   The remote computer on which to list files. Default = local system 

              
   -p passwd  Specify a password for user (optional). Passed as clear text.
              If omitted, you will be prompted to enter a hidden password.

   -u user    Specify a username for login to remote computer(optional).

   Id         Identifier (as assigned by PsFile) of the file for which to display info or to close.

   Path       Full or partial path of files to match for information display or close.

   -c         Close the files identifed by ID or path.

Unlike the NET FILE command, PsFile does not truncate long filenames.

Examples:


List all the files on \\workstation64 that have been opened remotely:

psfile \\workstation64

Related Commands:

NET FILE - Display all the open shared files on a server and the lock-id

Equivalent Linux BASH commands:

flock - apply or remove an advisory lock on an open file
fcntl - manipulate file descriptor
dnotify - file-monitoring mechanism
inotify - file-monitoring mechanism



Back to the Top

Simon Sheppard
SS64.com