怎麼寫批處理bat檔案來替換檔案

時間 2021-07-08 22:30:32

1樓:匿名使用者

上面的都不對.

@echo off

copy /y "c:\program files\thunder\userconfig.ini" "c:

\program files\thunder\profiles\userconfig.ini"

start "" ""c:\program files\thunder\thunder.exe"

存為bat放到開始選單的啟動資料夾裡.

注意:前提是關閉迅雷自帶的開機啟動.

2樓:

@echo off

copy /y "c:\program files\thunder\userconfig.ini" "c:

\program files\thunder\profiles\userconfig.ini"

start "" "c:\program files\thunder network\thunder\thunder.exe"

儲存為.bat檔案,把他拖到"開始"--"程式"--"啟動"裡面就可以了

3樓:匿名使用者

不要用迅雷的開機執行功能,否則不能保證批處理是否會在迅雷前執行,在批處理裡啟動迅雷.

copy c:\program files\thunder\userconfig.ini c:

\program files\thunder\profiles\userconfig.ini /y

"c:\program files\thunder network\thunder\thunder.exe" /s

其實不一定要在開機時執行,也可以在關機時替換.

執行 gpedit.msc

計算機配置--windows 設定--指令碼(啟動/關機)--關機--新增--指令碼名--瀏覽找到你的指令碼--確定.

這個指令碼不用啟動迅雷,只要

copy c:\program files\thunder\userconfig.ini c:

\program files\thunder\profiles\userconfig.ini /y

就可以了

4樓:一百一渡

copy %0 "c:\program files\thunder\profiles\userconfig.ini"

拖到啟動項.

5樓:匿名使用者

xcopy /y c:\program files\thunder\userconfig.ini c:

\program files\thunder\profiles\userconfig.ini

是不是這樣

批處理bat檔案,關於bat判斷怎麼寫?

批處理檔案。在每一條命令後面加 例如ping 開啟。bat檔案,在最後部分加上 c 這樣c盤下就有對應的log了。這樣肯定錯誤。加到相應的bat內部去。bat 判斷檔案是否存在,不存在的話等待1秒再次判斷 echo off set name rem 這行是你需要查詢的檔案,如果存在就會馬上退出 ya...

bat檔案中如何建立時間變數,批處理獲取了檔案的修改時間,怎麼賦值給變數

date 和time兩個變數中包含了當前的的日期和時間。date 6,4 就是引用date變數中,第六個字元開始的連續四位字元 在cmd中,輸入命令data 或 time 顯示為 bat批處理,生成名字含時間變數的檔案 修訂版 可見date包含的字串為 12 08 2010 wed,time包含的字...

請問bat批處理檔案為何無法正常用date變數進行賦值

瘋狂的鼴鼠 我給你解讀一下 set date date 8,2 date是系統變數,也就是說date 2018 09 01,再加上字串擷取 date 8,2 就是從第8個字元開始向後擷取2個字元,所以 date 8,2 01 set month date 5,2 到了這裡由於上面給date重新賦值了...