首 页论 坛破解QQ密码领免费QQ秀QQ等级修改盗取QQ教程QQ密码暴力破解QQ空间完整做法免费开所有QQ业务
设为首页
加入收藏
联系我们
您当前的位置:下载者 -> 编程设计 -> 文章内容
栏目导航
· QQ文章 · 综合文章
· 安全文章 · 新闻动态
· 实用技巧 · 入侵检测
· 木马病毒 · 电脑常识
· 编程设计 · 网络技术
相关文章

马化腾:我就是一个工程师
绝密!为WindowsXP系统设置一..
我们不在沉默 给入侵黑客一个..
黑客企图利用一个关键Window..
美俄为垃圾邮件大户 每3秒出..
又一个IE 0day漏洞 - 问题出..
搭建一个Windows下的蜜罐系统..
alpha2 shellcode解密的vbs脚..
美国白领社交网站LinkedIn昨..
当网站不允许上传asp木马时的..
埃及10日互联网恢复 免费补偿..
如何将多个文件捆绑成一个可..
一个简单的端口扫描编程序题..
灭了珊瑚虫,下一个是谁?
因为腾讯QQ屏蔽.cn,我差点丢..
制作一个简易的QQ****立即实..
一个Web网页下蠕虫的简单实现..
一个Web网页下蠕虫的简单实现..
从一个黑客到安全网站CEO
一个垃圾邮件发送者的幸福生..

一个扩展dir命令的vbs脚本
发布时间:2008-5-12 13:08:09

‘CMD下的dir好像没法列出从某段时间到某段时间的文件,所以写了这个小东东

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 & “个.” & vbCrLf & “共搜索目录:” & DirTotal & “个.” &vbcrlf&”文件总数大小”&FormatNumber(FileTotalsize/1024,0)&”kB”& vbCrLf & “用时:” & 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
[] [打 印] [收 藏]
关于本站 网站帮助 广告合作 下载声明 友情连接 网站地图 联系站长
如果您对本站有任何建议或意见,请联系站长,感谢您对本站一如既往的支持!
Powered by:NewAsp SiteManageSystem Version 2.1 SP1 1030