Openfiles
			
			
			
			
			This page is from Microsoft
			Updated: January 21, 2005
			Queries, displays, or disconnects open files or files opened by 
			network users. Also enables or disables the system Maintain Objects 
			List global flag.
			To view the command syntax, click a command:
			
			
			
				Disconnects one or more open files.
			Syntax
			
				openfiles /disconnect [/sComputer [/uDomain\User 
				[/pPassword]]] {[/idOpenFileID] | [/aUserName] 
				| [/oOpenMode]} [/opOpenFileName]
			Parameters
			
				
					
						
							/sComputer
						
							Specifies the name or IP address of a remote 
							computer (do not use backslashes). The default is 
							the local computer. This parameter applies to all 
							files and folders specified in the command.
					 
					
						
							/uDomain\User
						
							Runs the script with the permissions of the 
							specified user account. The default is system 
							permissions.
					 
					
						
							/pPassword
						
							Specifies the password of the user account that is 
							specified in the /u parameter.
					 
					
						
							/idOpenFileID
						
							Disconnects the file opened with the specified 
							numeric OpenFileID on the computer specified 
							by the /s parameter. Use openfiles /query 
							to learn the file ID. The wildcard (*) can be used 
							to disconnect all open files on the specified 
							computer.
					 
					
						
							/aUserName
						
							Disconnects all open files by UserName value. 
							The wildcard (*) can be used to disconnect all open 
							files on the specified computer.
					 
					
						
							/oOpenMode
						
							Disconnects all open files by OpenMode value.
							OpenMode values are Read, Write or 
							Read/Write. The wildcard (*) can be used to 
							disconnect all open files on the specified computer.
					 
					
						
							/opOpenFileName
						
							Disconnects all open file connections created by a 
							specific OpenFile name. The wildcard (*) can 
							be used to disconnect all open files on the 
							specified computer.
					 
					
						
							/?
						
							Displays help at the command prompt.
					 
				 
			 
			Remarks
			
				- Using the /s, /u, and /p command-line 
				options The /u and /p command-line options are 
				available only when you use /s. You must use /p 
				with /u to provide the user's password. 
				 
			Examples
			
				
				The following examples show how you can use the openfiles 
				/disconnect command:
				
					
						
							
								
									
										
											
												
													openfiles /disconnect /id 1
openfiles /disconnect /a hiropln
openfiles /disconnect /o read/write
openfiles /disconnect /op "c:\my documents\somedoc.doc"
openfiles /disconnect /session machine /id 5
openfiles /disconnect /s srvmain /u maindom\hiropln /id 5
openfiles /disconnect /s srvmain /u maindom\hiropln /p p@ssW23 /id *
												 
											 
										 
									 
								 
							 
						 
					 
				 
			 
			Return to Top
			 
			
			
				Queries and displays all open files.
			Syntax
			
				openfiles /query [/sComputer [/uDomain\User 
				[/pPassword]]] [/fo {TABLE | LIST 
				| CSV}] [/nh] [/v]
			Parameters
			
				
					
						
							/sComputer
						
							Specifies the name or IP address of a remote 
							computer (do not use backslashes). The default is 
							the local computer. This parameter applies to all 
							files and folders specified in the command.
					 
					
						
							/uDomain\User
						
							Runs the script with the permissions of the 
							specified user account. The default is system 
							permissions.
					 
					
						
							/pPassword
						
							Specifies the password of the user account that is 
							specified in the /u parameter.
					 
					
						
							/fo format
						
							Specify the output format with one of the following 
							values:
					 
				 
				
					
					
						| TABLE | Displays output in a table. | 
					
						| LIST | Displays output in a list. | 
					
						| CSV | Displays output in Comma Separated Values format. | 
				
				
					
						
							/nh
						
							Suppresses column header in the output. Valid only 
							when the /fo parameter is set to TABLE 
							or CSV.
					 
					
						
							/v
						
							Specifies that detailed information be displayed in 
							the output.
					 
					
						
							/?
						
							Displays help at the command prompt.
					 
				 
			 
			Remarks
			
				- Using the /s, /u, and /p command-line 
				options The /u and /p command-line options are 
				available only when you use /s. You must use /p 
				with /u to provide the user's password. 
				 
			Examples
			
				
				The following examples show how you can use the openfiles 
				/query command:
				
					
						
							
								
									
										openfiles /query
openfiles /query /fo table /nh
openfiles /query /fo list /v
openfiles /query /s srvmain /u maindom\hiropln /p p@ssW23
									 
								 
							 
						 
					 
				 
			 
			Return to Top
			 
			
			
				Enables or disables the system Maintain Objects List global 
				flag.
			Syntax
			
				openfiles /local [{on | off}]
			Parameters
			
				
					
						
							{on | off} 
						
							Enables or disables the system Maintain Objects List 
							global flag, which tracks local file handles. 
							Changes made by this switch will take effect only 
							after restarting the system.
					 
					
						
							/?
						
							Displays help at the command prompt.
					 
				 
			 
			Remarks
			
				- Enabling the Maintain Objects List global flag may slow down 
				your system.
Examples
			
				To check the current status of the Maintain Objects List global 
				flag, type:
openfiles /local
				To enable the Maintain Objects List global flag, type:
				openfiles /local on
				To disable the Maintain Objects List global flag, type:
				openfiles /local off
				
					
					Formatting legend
					
					
					 
					
					
					
						| Italic | Information that the user must supply | 
					
						| Bold | Elements that the user must type exactly as shown | 
					
						| Ellipsis (...) | Parameter that can be repeated several times in a 
						command line | 
					
						| Between brackets ([]) | Optional items | 
					
						| Between braces ({}); choices separated by pipe (|). 
						Example: {even|odd} | Set of choices from which the user must choose only 
						one | 
					
						| Courier font | Code or program output | 
				
			
			
 |  |