|
生成vbs有点麻烦。试试这个,写得比较复杂
- @echo off
- for /f "delims=" %%f in ('mshta.exe "about:<object id=d classid=clsid:3050f4e1-98b5-11cf-bb82-00aa00bdce0b></object><script>moveTo(0,-9999);function window.onload(){var p=/[^\0]*/;new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).Write(p.exec(d.object.openfiledlg('',null,'All files (*.*)|*.*|Microsoft Word (*.doc;*.docx)|*.doc;*.docx|Adobe pdf (*.pdf)|*.pdf|','Select file'))+'\n');close();}</script><hta:application showintaskbar=no />"^&rundll32 javascript:"\..\mshtml,RunHTMLApplication "^;var%%20folder^=new%%20ActiveXObject^("Shell.Application"^).BrowseForFolder^(0^,"Select Folder"^,64^,17^)^;folder^=folder.items^(^)^;folder^=folder.item^(^)^;folder^=folder.Path^;new%%20ActiveXObject^("Scripting.FileSystemObject"^).GetStandardStream^(1^).Write^(folder^)^;close^(^)') do echo,%%f
- pause
复制代码 |
|