2016-06-27 63 views
0

我想爲curl命令創建一個windows批處理文件,每五分鐘運行一次並將其保存到本地文件中。這裏是我的捲曲命令curl的批處理文件

curl -k https://root:[email protected]/webacs/api/v1data/ClientDetails?.full=true > C:\Users\Desktop\Sample1\curl 

請問我該怎麼做批處理文件?

+1

你這樣做,什麼不工作? – SomethingDark

+0

xml文件中未顯示任何詳細信息。 – jei

+0

...什麼XML文件? – SomethingDark

回答

0

就像這樣:?

@echo off 
echo Begining at %time% 
set file=https://root:[email protected]/webacs/api/v1data/ClientDetails?.full=true 
if not exist "C:\Users\Desktop\Sample1\curl" echo. > "C:\Users\Desktop\Sample1\curl" 
:top 
echo Ran at %time% 
curl -k %file% >> C:\Users\Desktop\Sample1\curl 
echo waiting 5 minutes... Press Q to download now. 
choice /c q /d q /t 300 /n 
goto top 

注意:您可能需要將URL從

https://root:[email protected]/webacs/api/v1data/ClientDetails?.full=true 

改變

https://root:[email protected]/webacs/api/v1data/ClientDetails?.full^=true 

我不能肯定它會如何處理它。