Search, Windows Explorer and More in Windows Vista - OpenFiles
(Page 2 of 5 )
\windows\system32\openfiles.exe
List all currently open files, either shared and accessed by other users on a network or (optionally) opened locally.
To open
Start -> type command into the Search field -> right-click on Command Prompt -> Run as Administrator
Usage
openfiles /local [ on | off ]
openfiles /query [/s system [/u user [/p [pass]]]]
[/fo format] [/nh] [/v]
openfiles /disconnect [/s system [/u user [/p [pass]]]]
{[/id id] [/a accessedby] [/o openmode]} [/op openfile]
Description
The OpenFiles tool lets you view a list of all the shared files that are currently open across the network and, optionally, files that are opened locally. You can use this to avoid deleting or changing a document that a remote user is working on.
Type openfiles without any options to display a report such as this:
Files Opened Remotely via local share points:
--------------------------------------
ID Accessed By Type Open File (Path\executable)
===== ============= ========== ==========
98 LOU Windows C:\Stuff to Eat\frittatas.txt
101 EDDIE Windows C:\Stuff to Drink\milkshakes.txt
107 CLANCY Windows C:\Stuff to Eat\pork chops.txt
OpenFiles accepts one of three primary commands, each of which has a range of parameters:
/local [parameters]
Turn on or off the inclusion of local files in reports.
Type:
openfiles /local on
to turn on the "maintain objects list" global flag; this setting is turned off by default and requires Windows to be restarted when changed. Note that turning on this setting may slightly reduce performance.
/query [parameters]
Display a list of opened files and folders;
specify /query for more flexibility than using openfiles without any options, such as the ability to connect to a different machine. Type openfiles /query /? for more information on the available parameters.
/disconnect [parameters]
Selectively disconnect files and folders that have been opened remotely. When viewing the list of open files, each entry has an ID; you can use that ID to close open files. Type openfiles /disconnect /? for more information on the available parameters.
Notes
- OpenFiles is available only to a user with administrator privileges.
See also
"Net," in Chapter 7
Next: Search >>
More BrainDump Articles
More By O'Reilly Media
|
This article is excerpted from chapter four of the book Windows Vista in a Nutshell, written by Preston Gralla (O'Reilly, 2006; ISBN: 0596527071). Check it out today at your favorite bookstore. Buy this book now.
|
|