wntFileUsers

Lists network users who have a file open.

Syntax:

wntFileUsers( server-name, file-pathname)

Parameters:

(s) server-name: the UNC name of the server on which the function will execute (eg, "\\MYSERVER") or a blank string ("") to indicate the current machine.

(s) file-pathname: a fully-qualified file name (eg, "C:\DOC\MYFILE.TXT") Note: The file name MUST be fully-qualified.

Returns:

(s) a tab-delimited list of user names.

 

Note: This function can only be performed by members of the Administrators or Account Operators local group.

 

The full path to the file in the wntFileUsers command is the path "as seen if you are at the server itself" and not "path as mapped from the workstation"

 

Example:
; Load Appropriate Extender
AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')

users=wntFileUsers( "\\Server","C:\DOC\MYFILE.TXT") AskItemlist("List of network users who have a file open", users, @TAB, @SORTED, @SINGLE) Exit
See Also:

wntCurrUsers