0
FOR /F %a in (downloadlist.txt) DO (
SET url=%a
&& SET suffix=%url:ftp://ftp.ncbi.nlm.nih.gov/genomes/all=%
&& SET combined=%url%%suffix%
&& SET a_link=%combined%%assembly%
&& echo %a_link%
&& SET t_link=%combined%%transcripts%
&& SET cds_link=%combined%%CDS%
&& SET p_link=%combined%%protein%
&& WGET %a_link%
&& WGET %t_link%
&& WGET %cds_link%
&& WGET %p_link%
)
我怎樣才能把它分成多行?這是我目前的,它不工作。我也嘗試使用^字符。我究竟做錯了什麼?Windows批處理不會讓我把多個「FOR」循環分成多行?
不工作怎麼樣?你有錯誤信息嗎?它是否以錯誤的順序運行命令?什麼? –
每當我嘗試在CMD中運行它,我會得到一個無效的語法錯誤。 – Ambushes
使用'%% a'代替'%a'。%a僅適用於命令提示符。批處理文件在循環中需要雙精度% – npocmaka