(view source code of files.cmd as plain text)
/* List open files on server */call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncsNETFILE = 60
BasePath = 'D:\'
parse arg SrvName UserId dummy
if dummy <> '' then call Syntax
if UserId = '' then call Syntax
if pos( '?', SrvName ) > 0 then call Syntax
myRc = NetEnumerate(NETFILE, 'fileInfo', SrvName, BasePath, UserId)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
exit 9
endif fileInfo.count = 0 then do
say 'No files open on the server'
call DropLsRxutFuncsendsay 'Number of open file entries: ' fileInfo.count
saydo i=1 to fileInfo.count
say fileInfo.i.id fileInfo.i.permissions fileInfo.i.num_locks fileInfo.i.pathnameendexit 0
Syntax: procedure
saysay 'Files'
say "Show all open files on server's D: drive for specified user ID"
saysay 'Usage: FILES \\server_name user_id'
exit 1
returnpage last modified: 2025-10-11; loaded in 0.0059 seconds