幫忙寫很簡單的批處理檔案,幫忙寫一個很簡單的批處理檔案

2021-12-23 01:34:27 字數 1654 閱讀 6519

1樓:匿名使用者

不知什麼用途,為了省時應該可以縮小些查詢範圍的(路徑、型別、非隱藏只讀等)

以下**中的日期格式如不符請自已修改(或追問),如修改的是隱藏或只讀檔案,則之後會設定屬性為隱藏及只讀,不會修改本批處理檔案的日期:

@echo off

for /f %%i in ("%date%")do set td=%%i

date 2014-01-01

for /f "delims=" %%i in ('dir/a-d/b/s c:\') do (

title 正在查詢 %%i

if /i "%%i" neq "%~f0" if "%%~ti" geq "2014-01-02" (

echo %%i&set/a n+=1

copy/b "%%i"+,, "%%~dpi">nul 2>nul||(

attrib -s -r -h "%%i"

copy/b "%%i"+,, "%%~dpi">nul

attrib +r +h "%%i") )

)title ok&date %td%

if defined n (echo 共%n%個檔案處理完畢)else 未發現需要處理的檔案

pause

2樓:浮生_寸光煙雨

on error resume nextset fso=wscript.createobject("scripting.filesystemobject")set fd=fso.

getfolder(".")set fs=fd.filesfor each f in fsdata=ucase(right(f.

name,4))i=1if data=".mod" thencreatedate=f.datelastmodifiedcreateyear=datepart("yyyy",createdate)createmonth=datepart("m",createdate)createday=datepart("d",createdate)createhour=datepart("h",createdate)createminute=datepart("n",createdate)newname=createyear&".

getfolder(".")set fs=fd.filesfor each f in fsdata=ucase(right(f.

幫我寫刪除登錄檔的BAT批處理檔案

reg檔案 hkey local 在前面加一個減號 hkey local 再雙擊此reg檔案匯入即可刪除相應登錄檔項,不用批處理 幫我寫一個刪除登錄檔的bat批處理檔案 reg檔案 hkey local 在前面加一個減號 hkey local 再雙擊此reg檔案匯入即可刪除相應登錄檔項,不用批處理 ...

要寫bat批處理檔案,怎麼寫,要寫一個bat批處理檔案,怎麼寫

為了你這個問題,我學習了批處理的基礎知識,現在的情況是這樣的 因為你們在另一個環境下執行的,telnet,所以與cmd不相連所以你要的功能是無法實現的,最主要是因為telnet通了後,它退出的時間太長且不定 建議,只能是自己觀察結果了 你寫的沒有錯,如果它telnet成功了,它就會停在那裡了,不會消...

麻煩幫忙翻譯下很簡單的

i will go wherever i want.i will be going to any place i wanted to go to.i will go to any place i want to go.i am going to go to any place i am longin...