(view source code of allfiles.cmd as plain text)
/* List open files on server */call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncsNETFILE = 60
BasePath = 'D:\'
parse arg SrvName dummy
if dummy <> '' then call Syntax
if SrvName = '' then call Syntax
if pos( '?', SrvName ) > 0 then call Syntax
myRc = NetEnumerate(NETFILE, 'fileInfo', SrvName, BasePath)
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'
exit 0
endsay '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.pathname fileInfo.i.usernameendexit 0
Syntax: procedure
saysay 'AllFiles'
say 'Show all open files on specified server'
saysay 'Usage: ALLFILES \\server_name'
exit 1
returnpage last modified: 2025-10-11; loaded in 0.0077 seconds