内射老阿姨1区2区3区4区_久久精品人人做人人爽电影蜜月_久久国产精品亚洲77777_99精品又大又爽又粗少妇毛片

如何使用vbs實(shí)現(xiàn)一個(gè)擴(kuò)展時(shí)間段的dir命令-創(chuàng)新互聯(lián)

這篇文章主要介紹了如何使用vbs實(shí)現(xiàn)一個(gè)擴(kuò)展時(shí)間段的dir命令,具有一定借鑒價(jià)值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。

成都創(chuàng)新互聯(lián)公司是一家專業(yè)提供十堰鄖陽(yáng)企業(yè)網(wǎng)站建設(shè),專注與成都網(wǎng)站建設(shè)、成都做網(wǎng)站、H5高端網(wǎng)站建設(shè)、小程序制作等業(yè)務(wù)。10年已為十堰鄖陽(yáng)眾多企業(yè)、政府機(jī)構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)網(wǎng)絡(luò)公司優(yōu)惠進(jìn)行中。

核心代碼

set Arg=Wscript.Arguments 
If Arg.Count=0 then 

Wscript.echo chr(9)&chr(9)&space(4)&"Xdir v0.1" 
Wscript.echo "" 
Wscript.echo chr(9)&"cscript dir.vbs path time1 time2 ext" 
Wscript.echo chr(9)&"cscript dir.vbs d:\test 20080101 20080430 doc" 
Wscript.Quit 
End If 
Path=Arg(0) 
Time1=Arg(1) 
Time2=Arg(2) 
Ext=Arg(3) 
FileTotal = 0 
DirTotal = 0 
FileTotalsize=0 
TimeSpend = Timer 
myFind Path 
TimeSpend = round(Timer - TimeSpend,2) 
txtResult = "搜索完成!" & vbCrLf & "共找到文件:" & FileTotal & "個(gè)." & vbCrLf & "共搜索目錄:" & DirTotal & "個(gè)." &vbcrlf&"文件總數(shù)大小"&FormatNumber(FileTotalsize/1024,0)&"kB"& vbCrLf & "用時(shí):" & TimeSpend & "秒." 

wscript.echo txtResult 

Sub myFind(ByVal thePath) 
  
Dim fso, myFolder, myFile, curFolder 
Set fso = wscript.CreateObject("scripting.filesystemobject") 
Set curFolders = fso.getfolder(thePath) 
DirTotal = DirTotal + 1 
If curFolders.Files.Count > 0 Then 
For Each myFile In curFolders.Files 
If InStr(1, LCase(Fso.GetExtensionName(myFile.Name)), ext) > 0 And Gtime(myFile.DateCreated) >Time1 And Gtime(myFile.DateCreated)<Time2 Then 
wscript.echo FormatPath(thePath) & "\" & myFile.Name 
FileTotal = FileTotal + 1 
FileTotalsize = FileTotalsize + myFile.size 
End If 
Next 
End If 
  
If curFolders.subfolders.Count > 0 Then 
For Each myFolder In curFolders.subfolders 
myFind FormatPath(thePath) & "\" & myFolder.Name  
Next 
End If 

End Sub 

Function FormatPath(ByVal thePath) 

thePath = Trim(thePath) 
FormatPath = thePath 
If Right(thePath, 1) = "\" Then FormatPath = Mid(thePath, 1, Len(thePath) - 1) 

End Function 


Function Gtime(str) 
str=FormatDateTime(str,2) 
str1=Split(str,"-",-1,1) 
If len(str1(1))=1 then str11="0"&str1(1) 
If len(str1(2))=1 then str12="0"&str1(2) 
Gtime=str1(0)&str11&str12 
End Function

感謝你能夠認(rèn)真閱讀完這篇文章,希望小編分享的“如何使用vbs實(shí)現(xiàn)一個(gè)擴(kuò)展時(shí)間段的dir命令”這篇文章對(duì)大家有幫助,同時(shí)也希望大家多多支持創(chuàng)新互聯(lián)網(wǎng)站建設(shè)公司,,關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,更多相關(guān)知識(shí)等著你來學(xué)習(xí)!

網(wǎng)站標(biāo)題:如何使用vbs實(shí)現(xiàn)一個(gè)擴(kuò)展時(shí)間段的dir命令-創(chuàng)新互聯(lián)
當(dāng)前網(wǎng)址:http://www.rwnh.cn/article2/ccieoc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站營(yíng)銷、動(dòng)態(tài)網(wǎng)站電子商務(wù)、靜態(tài)網(wǎng)站、響應(yīng)式網(wǎng)站企業(yè)建站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)
都安| 增城市| 云安县| 保德县| 江口县| 莱州市| 湾仔区| 栾城县| 法库县| 休宁县| 宜宾市| 吴忠市| 宁强县| 巴青县| 建平县| 沽源县| 丹江口市| 石棉县| 刚察县| 新乡县| 九龙县| 吉安市| 丰宁| 察雅县| 牙克石市| 沂南县| 贵南县| 田阳县| 绥江县| 宝坻区| 突泉县| 宁波市| 高要市| 香河县| 工布江达县| 全州县| 恩平市| 兰州市| 大丰市| 齐齐哈尔市| 濮阳县|