CMD DEL 指令請問 - Windows
By Heather
at 2015-11-11T15:34
at 2015-11-11T15:34
Table of Contents
作業系統:XP
Service Pack:3
發生問題頻率:
是否有做Windows Update:
問題內容:
請問我要做一個.bat 內容如下
del "d:\test\*_10411.*"
del "d:\test2\*_10411.*"
目的是刪除檔名中,含有該日期的檔案
有沒有辦法讓 10411 這個日期可以在開啟BAT時可以自己填入
像是填入 10412,就會刪除
del "d:\test\*_10412*"
del "d:\test2\*_10412*"
而不用每次都編輯BAT來修改
謝謝
---------------------------------------------------------------------
自己解答一下
批次黨內容如下
@echo off
set /p var=PleaseEnterVar:
del "d:\test\*_%var%*"
del "d:\test2\*_%var%*"
pause
執行後輸入月份就可以了
--
Tags:
Windows
All Comments
By Dora
at 2015-11-13T18:37
at 2015-11-13T18:37
By Kama
at 2015-11-14T01:22
at 2015-11-14T01:22
By Doris
at 2015-11-18T19:01
at 2015-11-18T19:01
By Catherine
at 2015-11-23T09:43
at 2015-11-23T09:43
By Frederica
at 2015-11-26T16:44
at 2015-11-26T16:44
By Bennie
at 2015-11-28T05:11
at 2015-11-28T05:11
By Andy
at 2015-11-28T22:39
at 2015-11-28T22:39
Related Posts
win 7企業版kms
By Frederic
at 2015-11-11T01:02
at 2015-11-11T01:02
win10界面下安裝win7
By Frederic
at 2015-11-10T23:14
at 2015-11-10T23:14
SSD 活動時間 100%
By Daph Bay
at 2015-11-10T18:45
at 2015-11-10T18:45
電腦只要閒置就會重開機?
By Charlotte
at 2015-11-10T00:41
at 2015-11-10T00:41
WIN10 無法建立家用群組
By Elma
at 2015-11-08T23:19
at 2015-11-08T23:19