- @set @n=0;/* & echo off
- pushd "D:\Test\"
- for /d /r %%a in (*) do (
- start "" "%%a"
- cscript -nologo -e:jscript %0 "%%a"
- )
- pause & exit/b & rem */
-
- WScript.Sleep(1000);
- objShell = new ActiveXObject("Shell.Application");
- fd = WScript.Arguments(0).replace(/\\/g, "/").toLowerCase();
- w = new Enumerator(objShell.Windows());
- for (;!w.atEnd();w.moveNext()) {
- path = w.item().LocationURL
- path = path.replace(/%([a-f\d]{2})/ig,
- function(s0, s1){return String.fromCharCode('0x'+s1)}
- )
- if (path.toLowerCase().indexOf(fd)>-1) w.item().Quit()
- }
复制代码
|