rem 获取当前日期
set TimeName=%date:~0,4%%date:~5,2%%date:~8,2%
rem 获取文件名
set file=%TimeName%
rem 获取文件大小
for %%i in ("D:historysshqdata\%file%") do (
set indexdx=%%~zi
)
rem 将文件大小导入到
echo %file% > body.txt
echo %indexdx% >> body.txt
:::::::::::::: 发送邮件参数设置::::::::::::::
set from=xxxxx@163.com
set user=xxxxx
set pass=xxxxx
set to=913956964@qq.com
set subj=测试
rem 你要发送的内容,写入文件文件
set mail=body.txt
rem 要发送的附件
set attach=*.jpg
set server=smtp.163.com
set debug=-debug -log blat.log -timestamp
rem 发送邮件命令,需要下载 C:UsersAdministratorDesktopBlat250fulllat.exe %mail% -to %to% -base64 -charset Gb2312 -subject %subj% -attach %attach% -server %server% -f %from% -u %user% -pw %pass% %debug%
pause
rem 获取当前时间
set t=%time:~0,2%
rem 判断,并发送邮件报警
if %t% == 10 (
if %indexdx% gtr 512000 ( C:UsersAdministratorDesktopBlat250fulllat.exe %mail% -to %to% -base64 -charset Gb2312 -subject %subj% -attach %attach% -server %server% -f %from% -u %user% -pw %pass% %debug%
pause )
)
if %t% == 14 (
if %indexdx% gtr 512000 ( C:UsersAdministratorDesktopBlat250fulllat.exe %mail% -to %to% -base64 -charset Gb2312 -subject %subj% -attach %attach% -server %server% -f %from% -u %user% -pw %pass% %debug%
pause )
)
if %t% == 15 (
if %indexdx% gtr 512000 ( C:UsersAdministratorDesktopBlat250fulllat.exe %mail% -to %to% -base64 -charset Gb2312 -subject %subj% -attach %attach% -server %server% -f %from% -u %user% -pw %pass% %debug%
pause )
)