scan-tcedit-user.bat
cd /D c:bin12 call scan-tcedit-user-daily.bat C:blat262fullblat scan-tcedit-user-daily.bat.log -to scm-svr-mtr@scm5.***.cn -s "scan-tcedit-user-daily" -charset gbk
scan-tcedit-user-daily.bat
cd /D c:bin12 echo ***账号总数*** > scan-tcedit-user-daily.bat.log sqlcmd -U sa -P *** -d Tcedit -Q "declare @x nvarchar(8);select @x=count(*) from userinfo where Locked='0';print @x;" -W >> scan-tcedit-user-daily.bat.log echo . >> scan-tcedit-user-daily.bat.log echo ***账号变化*** >> scan-tcedit-user-daily.bat.log sqlcmd -h-1 -U sa -P *** -d Tcedit -Q "SET NOCOUNT ON;select UserName,RealName,EmailAddr from userinfo where Locked='0' order by UserName asc" -W -o scan-tcedit-user1.txt C:"Program Files"GnuWin32bindiff scan-tcedit-user1.txt scan-tcedit-user.txt >> scan-tcedit-user-daily.bat.log type scan-tcedit-user1.txt > scan-tcedit-user.txt echo . >> scan-tcedit-user-daily.bat.log echo ***账号不是集团的邮箱*** >> scan-tcedit-user-daily.bat.log findstr -V "***.com @***.com @***.com @***.com @***.com @***.cn @***.com @***.cn @***.com @***.cn @***.com @***.com.cn @***.com @***.cn @***.com" scan-tcedit-user1.txt >> scan-tcedit-user-daily.bat.log echo . >> scan-tcedit-user-daily.bat.log echo ***账号没有mail*** >> scan-tcedit-user-daily.bat.log sqlcmd -h-1 -U sa -P *** -d Tcedit -Q "SET NOCOUNT ON;select UserName,RealName,EmailAddr from userinfo where Locked='0' and EmailAddr='' order by UserName asc" -W >> scan-tcedit-user-daily.bat.log