运行批处理 在XP上能运行,win7不行
麻烦请看下,本人初学,搞不太明白,以下批处理命令在xp下可以成功截图,用本机ip地址命名,并上传到ftp,而在win7下,则提示echo处于关闭状态,之后运行没有获取到i...
麻烦请看下,本人初学,搞不太明白,以下批处理命令在xp下可以成功截图,用本机ip地址命名,并上传到ftp,而在win7下,则提示echo处于关闭状态,之后运行没有获取到ip地址,得到的截图文件为 ".gif"
@echo off
setlocal enabledelayedexpansion
::run start ""
for /f "tokens=15" %%a in ('ipconfig ^| find /i "IP Address"') do set IP_addr=%%a
::echo %IP_addr%
echo set ws = createobject("wscript.shell")>sleep5.vbs
echo WScript.Sleep 1000*10>>sleep5.vbs
sleep5.vbs
del sleep5.vbs
nircmd win activate ititle "鲁大师"
nircmd savescreenshotwin "C:\%IP_addr%.gif"
echo open 172.0.4.253>ftp.txt
echo share>>ftp.txt
echo share>>ftp.txt
echo lcd C:\>>ftp.txt
echo put %IP_addr%.gif>>ftp.txt
echo bye>>ftp.txt
ftp -s:ftp.txt
del ftp.txt
echo 上传成功!
pause 展开
@echo off
setlocal enabledelayedexpansion
::run start ""
for /f "tokens=15" %%a in ('ipconfig ^| find /i "IP Address"') do set IP_addr=%%a
::echo %IP_addr%
echo set ws = createobject("wscript.shell")>sleep5.vbs
echo WScript.Sleep 1000*10>>sleep5.vbs
sleep5.vbs
del sleep5.vbs
nircmd win activate ititle "鲁大师"
nircmd savescreenshotwin "C:\%IP_addr%.gif"
echo open 172.0.4.253>ftp.txt
echo share>>ftp.txt
echo share>>ftp.txt
echo lcd C:\>>ftp.txt
echo put %IP_addr%.gif>>ftp.txt
echo bye>>ftp.txt
ftp -s:ftp.txt
del ftp.txt
echo 上传成功!
pause 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询