Openfiles commands in Windows

Allows administrators to query, display, or disconnect files and folders that have been opened on the system. In addition, this command can also license or disable the Maintain Objects List system.

Allows administrators to query, display, or disconnect files and folders that have been opened on the system.In addition, this command can also license or disable the Maintain Objects List system.

This article includes information about the following commands:

Openfiles commands in Windows

  1. openfiles / disconnect
  2. openfiles / query
  3. openfiles / local

openfiles / disconnect

Allows administrators to disconnect opened files and folders remotely via a shared folder.

Syntax command openfiles / disconnect

 openfiles / disconnect [/ s [/ u [] [/ p []]]] {[/ id] | [/ a] | read / write}]} [/ op] 

The openfiles / disconnect command parameter

Parameters

Describe

/S

Specify the remote system to connect to (by name or IP address).Do not use backslashes.If you do not use the / s option, the command will be executed on the local computer by default.This parameter applies to all files and folders specified in the command.

/ u []

Execute the command using the rights of the specified user account.If you do not use the / u option, the system permissions will be used by default.

/ p []

Specify the password of the user account specified in the option / u.If you do not use the / p option, the password prompt will appear when the command is executed.

/ id

Disconnect open files according to the specified file ID.Wildcard (*) can be used with this parameter.

Note: You can use the openfiles / query command to find the file ID.

/ a

Disconnect all open files associated with the user name specified in the AccessedBy parameter.Wildcard (*) can be used with this parameter.

read / write}

Disconnect all open files with the specified open mode value.Valid values ​​are Read, Write or Read / Write.Wildcard (*) can be used with this parameter.

/ op

Disconnect all open file connections, which are created by a specific open file name.Wildcard (*) can be used with this parameter.

/?

Show help at the command prompt.

For example, openfiles / disconnect command

To disconnect all open files with the file ID of 26843578, enter:

 openfiles / disconnect / id 26843578 

To disconnect all open files and folders accessed by "hiropln" users, enter:

 openfiles / disconnect / a hiropln 

To disconnect all open files and folders with read or write mode, enter:

 openfiles / disconnect / o read / write 

To disconnect the folder with the name Open File as "C: TestShare", regardless of who is accessing this file, type:

 openfiles / disconnect / a * / op "c: testshare" 

To disconnect all open files on the remote computer named "srvmain" being accessed by "hiropln" users, regardless of their ID, enter:

 openfiles / disconnect / s srvmain / u maindomhiropln / id * 

openfiles / query

Query and display all open files.

Syntax command openfiles / query

 CSV}] [/ nh] [/ v] 

The command openfiles / query command

Parameters

Describe

/S

Specify the remote system to connect to (by name or IP address).Do not use backslashes.If you do not use the / s option, the command will be executed on the local computer by default.This parameter applies to all files and folders specified in the command.

/ u []

Execute the command using the rights of the specified user account.If you do not use the / u option, system permissions are used by default.

/ p []

Specify the password of the user account specified in the option / u.If you do not use the / p option, the password prompt will appear when the command is executed.

CSV}]

Display the output in the specified format.Valid values ​​for the format are:

TABLE: Displays output in a table.

LIST: Display output results in a list.

CSV: Display output results in value format separated by commas.

/ nh

Remove column headers in the output.Valid only when the / fo parameter is set to TABLE or CSV .

/ v

Specify that detailed information is displayed in the output.

/?

Show help at the command prompt.

Example command openfiles / query

To query and display all open files, enter:

 openfiles / query 

To query and display all open files in a tabular format without a title, enter:

 openfiles / query / fo table / nh 

To query and display all open files in the list format with details, enter:

 openfiles / query / fo list / v 

To query and display all open files on the remote system named "srvmain" using credentials for "hiropln" users on the "maindom" domain, enter:

 openfiles / query / s srvmain / u maindomhiropln / pp @ ssW23 

Attention:

In this example, the password is provided on the command line.To turn off the password display, exit the / p option .You will be prompted to enter the password, the password will not be displayed on the screen.

openfiles / local

Turn on or turn off the Maintain Objects List system.If used without parameters, openfiles / local will display the current status of the Maintain Objects List

Syntax of openfiles / local command

 openfiles / local [on | off] 

The parameter openfiles / local command

Parameters

Describe

[on |off]

Allow or disable the system Maintain the object List the global flag, monitor local processing files.

/?

Show help at the command prompt.

Note the command openfiles / local

  1. Enabling Maintain Objects List can slow down your system.
  2. Changes are made using the on or off option that has no effect until you restart the system.

For example, openfiles / local command

To check the current status of the Maintain Objects List, type:

 openfiles / local 

By default, Maintain Objects List will be off and the following output will be displayed:

 INFO: The global system flag 'maintain objects list' is currently disabled. 

To enable Maintain Objects List, enter:

 openfiles / local on 

The following message will be displayed when the Maintain Objects List is turned on:

 SUCCESS: The global system flag 'maintain list objects' is enabled. 

Đây sẽ được thực hiện sau khi hệ thống được khởi động.

To turn off Maintain Objects List, enter:

 openfiles / local off 

see more

 

  1. The net print command in Windows
  2. Netcfg command in Windows
  3. Nbtstat command in Windows
  4. Bitsadmin create command in Windows

 

3.9 ★ | 122 Vote