![]() |
PCDVD數位科技討論區
(https://www.pcdvd.com.tw/index.php)
- 七嘴八舌異言堂
(https://www.pcdvd.com.tw/forumdisplay.php?f=12)
- - 為什麼這個批次檔執行無效??
(https://www.pcdvd.com.tw/showthread.php?t=1160056)
|
---|
為什麼這個批次檔執行無效??
為了清line的cache..內容如下
del C:\Users\User1\AppData\Local\LINE\Cache\*.* 執行完cache下的資料夾還在?? :confused: |
引用:
你的登入帳號為 "User1" ??是嗎? 我也有一個批次也是清line的cache 我是這樣寫的~給你參考 rd/s C:\Users\%UserName%\AppData\Local\LINE\Cache /Q |
Q.為什麼資料夾還在?
A.因為del不是刪除資料夾的指令。 |
刪除目錄 (rd, rmdir)
/S : 除目錄本身,一併移除指定目錄裡的所有目錄和檔案。 /Q : 安靜模式 ex: 刪除 D:\Test 底下所有目錄與檔案,不予以提示 rd D:\Test /s /q 刪除多個 / 一個檔案 (del, erase) /P : 刪除前提示。 /F : 強制刪除唯讀 /S : 由所有子目錄刪除指定檔案 /Q : 安靜模式 /A : 依指定屬性,又分 H(隱藏), S(系統), D(目錄), R(唯讀), A(保存), -(反向) |
deltree 表示:...... :cry:
|
deltree只適用非NT系統,也就是古代9x在用的,
在NT系統中只可用 RD 來刪目錄,在早期(如NT4.0,W2000),該命令只可刪空目錄,後來才改成非空目錄也可直接刪除。 |
引用:
所以它什麼都沒說啊... :laugh: |
引用:
對齁!太久沒用了QQ 都忘了,MD, RD, CD... :stupefy: |
引用:
知道且實際自己寫過dos 開機批次檔 config檔的 都已經是大叔了.. |
我是這樣搞
@echo off rd/s C:\Users\%UserName%\AppData\Local\LINE\Cache /Q del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp del /f /s /q %systemdrive%\*.log del /f /s /q %systemdrive%\*.gid del /f /s /q %systemdrive%\*.chk del /f /s /q %systemdrive%\*.old del /f /s /q %systemdrive%\recycled\*.* del /f /s /q %windir%\*.bak del /f /s /q %windir%\prefetch\*.* del /f /q %userprofile%\cookies\*.* del /f /q %userprofile%\recent\*.* del /f /s /q “%userprofile%\Local Settings\Temporary Internet Files\*.*” del /f /s /q “%userprofile%\Local Settings\Temp\*.*” del /f /s /q “%userprofile%\recent\*.*” DEL /S /F /Q “%systemroot%\Temp\*.*” DEL /S /F /Q “%AllUsersProfile%\「開始」功能表\程式集\Windows Messenger.lnk” RD /S /Q %windir%\temp & md %windir%\temp RD /S /Q “%userprofile%\Local Settings\Temp” MD “%userprofile%\Local Settings\Temp” RD /S /Q “%systemdrive%\Program Files\Temp” MD “%systemdrive%\Program Files\Temp” RD /S /Q “%systemdrive%\d” net user aspnet /delete cleanmgr /sagerun:99 exit |
所有的時間均為GMT +8。 現在的時間是04:05 AM. |
vBulletin Version 3.0.1
powered_by_vbulletin 2025。