婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > 一個(gè)擴(kuò)展時(shí)間段的dir命令的vbs腳本

一個(gè)擴(kuò)展時(shí)間段的dir命令的vbs腳本

熱門標(biāo)簽:外呼系統(tǒng)群 墨西哥地圖標(biāo)注app 企業(yè)400電話辦理價(jià)錢低 龍巖400電話申請 天津智能外呼系統(tǒng)排名 外呼系統(tǒng)說話聲音小怎么辦 機(jī)器人打電銷適用于美業(yè)嗎 智云億呼電話機(jī)器人 上海辦理400電話選號

核心代碼

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)str11str12 
End Function 

這篇文章就介紹到這,希望大家以后多多支持腳本之家。

標(biāo)簽:麗水 錫林郭勒盟 鄂爾多斯 承德 黃山 阜新 青島 齊齊哈爾

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《一個(gè)擴(kuò)展時(shí)間段的dir命令的vbs腳本》,本文關(guān)鍵詞  一個(gè),擴(kuò)展,時(shí)間段,的,dir,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《一個(gè)擴(kuò)展時(shí)間段的dir命令的vbs腳本》相關(guān)的同類信息!
  • 本頁收集關(guān)于一個(gè)擴(kuò)展時(shí)間段的dir命令的vbs腳本的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 盐亭县| 墨竹工卡县| 咸阳市| 张家口市| 兰溪市| 旬邑县| 乾安县| 南华县| 昌都县| 雷山县| 台北县| 乐业县| 横峰县| 读书| 电白县| 大理市| 广水市| 麻栗坡县| 香港 | 吉木乃县| 大宁县| 扬中市| 东乌珠穆沁旗| 望谟县| 土默特右旗| 营口市| 江津市| 阜南县| 锡林浩特市| 黔西县| 呼伦贝尔市| 开封市| 宁明县| 梨树县| 安龙县| 涞水县| 大石桥市| 前郭尔| 巴塘县| 海盐县| 都江堰市|