- 1>1/* :
- @echo off&Setlocal ENABLEDELAYEDEXPANSION
- for %%a in (
- "\\l8D150722WE02--b(z)\D150722WE02\"
- "\\l19D150816WB01--d(z)\D150816WB01\"
- "\\L30DY05K121-e(z)\DY05K121\"
- "\\L06dxb706--f(h)\dxb706\"
- "\\l19dy05t103--c(h)\dy05t103\"
- "\\L31D150824WE01--a(h)\D150824WE01\"
- "\\L0739h124-e(h)\39h124\"
- "\\l19D150810WK02--f(h)\D150810WK02\"
- ) do cscript -nologo -e:jscript %0 %%~a
-
- ::如果批处理不在桌面先切换目录或指定路径
- ::for /f "tokens=2,*" %%i in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Desktop"') do set "desk=%%j"
- ::cd /d "%desk%"
- set n=0
- for /f "delims=" %%f in ('dir *.lnk /od /a-d /b') do (
- set/a m=!n!%%3,k=!n!/3
- if "!m!"=="0" md "dir!k!"
- move "%%f" "dir!k!\" >nul
- set/a n+=1
- )
- pause&exit
- */
-
- var path = WScript.Arguments(0)
- var name = path.replace(/.*\\(.+?)\\$/,'$1')
- var ws = new ActiveXObject('WScript.Shell')
- var desktop = ws.SpecialFolders('Desktop')
-
- with(ws.CreateShortcut(desktop + '\\' + name + '.lnk')){
- TargetPath = path
- WindowStyle = 1
- Description = name
- Save()
- }
复制代码
|