windows bat 經常使用命令

1,Schtasks,任務計劃命令shell

  /create 建立任務計劃app

 /tn task name命令行

 /tr task run  code

/st start timeget

/ed end dateclass

/sc schedule type 任務類型,好比天天,每週,每個月。。。date

   eg:程序

schtasks /create /tn "aaaScan" /tr %app_home%\aaa.bat /sc daily /st 08:00 
/ed 2015/12/31

     可用於bat控制任務計劃程序;官方手冊im

2,bat處理路徑相關文件

echo 當前盤符:%~d0;
echo 當前路徑:%cd%;
echo 當前執行命令行:%0;
echo 當前bat文件路徑:%~dp0;
echo 當前bat文件短路徑:%~sdp0;
相關文章
相關標籤/搜索