我編輯了一個(gè)自動(dòng)收取ftp空間文件的批處理,遇到了一些錯(cuò)誤, 請(qǐng)指正。代碼如下: @ec-o 開始下載課件 rem//設(shè)置變量 set ftpfile=getfiles.tmp set logfile=getfiles.log set last=last-zxjls.log set lastlist=pp-zxjls.log set mores=lists.log rem// 列表 ec-o open 172.16.1.21 > "%ftpfile%" set username="zxjls" set password=" " ec-o %username% > > "%ftpfile%" ec-o %password% > > "%ftpfile%" ec-o ls ^ > last-zxjls.log > > "%ftpfile%" ec-o bye > > "%ftpfile%" ftp -s:"%ftpfile%" del "%ftpfile%" rem// 記錄log ec-o ^ > ^ > --------------------------- > > "%logfile%" date /t > > "%logfile%" time /t > > "%logfile%" rem// 比較文件 copy nul %mores% for /f "tokens=1 delims=," %%i in (%lastlist%)do set "%%i=y" for /f "tokens=1,2 delims=," %%m in (%last%)do ( if defined %%m (set "%%m=")else ec-o.%%m%%n > > %mores%) rem// 比較完畢,用last替換last-last copy "%last%" "%lastlist%" rem// 可以進(jìn)行下載了,列表儲(chǔ)存在(mores)中 ec-o open 172.16.1.21 > "%ftpfile%" ec-o %username% > > "%ftpfile%" ec-o %password% > > "%ftpfile%" ec-o prompt n > > "%ftpfile%" ec-o type binary > > "%ftpfile%" ec-o runique y > > "%ftpfile%" for /f "tokens=*" %%i in (%mores%) do ec-o mget "%%i" > > "%ftpfile%" ec-o bye > > "%ftpfile%" rem// 下載文件 ftp -s:"%ftpfile%" > > "%logfile%" rem// 記錄成功log ec-o 下載成功! > > "%logfile%" ec-o ^ > ^ > --------------------------- > > "%logfile%" del "%ftpfile%" del "%last%" del "%mores%" @Ec-o Off Set vMsg="“zxjls”目錄下所有文件已經(jīng)下載到 桌面/歷史 programmed by:ljq29@-" Ec-o MsgBox %vMsg% > "%temp%\tempMsg.vbs" Wscript- //Nologo "%temp%\tempMsg.vbs"1 個(gè)答案
答案 1:
錯(cuò)誤是什么?