大致想法如下:
ftp -s:filename hosts >result.txt 執(zhí)行腳本,并將結(jié)果定向輸出到result.txt
腳本內(nèi)容,如
cd mydir
ls
bye
可以將mydir命令列出
然后使用批處理分析result.txt
從150 Opening ASCII mode data connection for file list.的下一行開始算,直到226 Transfer complete都是要下載的內(nèi)容
然后用批處理加ftp腳本,使用get命令逐個(gè)下載但實(shí)際過程中發(fā)現(xiàn),在FTP腳本中使用get有問題,提示參數(shù)錯誤,無法使用。
查看了ftp的幫助ftp -?
G:>ftp -?
Transfers files to and from a computer running an FTP server service
(sometimes called a daemon). Ftp can be used interactively.
新聞熱點(diǎn)
疑難解答