本帖最后由 dyj545 于 2014-12-19 08:11 编辑
请帮忙看看那些写错了.运行后的结果
"磁盘空间剩余 33506MB"
Blat v2.5.0 w/GSS encryption (build : Sep 14 2005 22:46:29)
Blat saw and processed these options, and found fault with the last one...
-to
Not enough arguments supplied for option: -to
Blat found fault with: -to
-to <recipient> : recipient list (also -t) (comma separated)
请按任意键继续. . .
以下是代码- @echo off
- :::::::::::::: 查询硬盘空间::::::::::::::
- set dn=d
- for /f "tokens=2* delims=:" %%a in ('fsutil volume diskfree %dn%:') do set ds=%%a
- set ds=%ds:~0,-6%
- ::::::::::::::判断磁盘空间以MB为单位::::::::::::::
- if %ds% lss 50000 (
- echo "磁盘空间剩余%ds%MB"
- echo "磁盘空剩余%ds%MB" >body.txt
- echo "磁盘空间不足,请及时清理." >>body.txt
-
- set from=1234@163.com
- set user=1234@163.com
- set pass=1234
- set to=1234@163.com
- set subj=server6_disk_used_testmail
- set mail=body.txt
- set attach=*.jpg
- set server=SMTP服务器
- set debug=-debug -log blat.log -timestamp
-
- blat %mail% -to %to% -base64 -charset Gb2312 -subject %subj% -attach %attach% -server %server% -f %from% -u %user% -pw %pass%
- ) else (
- echo 磁盘空间足够
- )
- pause
复制代码
|