if not exist E:\userchk mkdir E:userchk
if not exist E:\userchk\usercheck.bat copy %~dp0usercheck.bat E:\userchk
at |findstr "usercheck" || at 1:00 /every:15 start e:\usrchk\usercheck.bat
set b=%date:~0,10%
set b=%b:/=-%
setlocal enabledelayedexpansion
for /f "tokens=2 delims=:" %%i in ('ipconfig^|find /i "IPv4 "') do echo "%%i" |findstr 10 && set a=%%i && goto start || set a=no
:start
set a=%a: =%
set c=%b%-%a%
set "c=%c: =%"
set n=0
net user >>E:\userchk\"%c%-%computername%.txt"
for /f "skip=4 tokens=1,2,3 delims= " %%i in ( E:\userchk\%c%-%computername%.txt ) do net user %%i && net user %%i >>E:\userchk\%c%-
%computername%.txt & net user %%j >>E:\userchk\%c%-%computername%.txt & net user %%k >>E:\userchk\%c%-%computername%.txt & set /a
n=1+!n!
echo user'Num is !n!
net use q: \\10.101.22.*\UserCHK\FFP passwd/user:superadmin
copy E:\userchk\%c%-%computername%.txt q:\