- @echo off
- set "scfile=QQ"
-
- for %%i in ("%USERPROFILE%\Desktop\") do set "scp=%%~pi"
- if exist %USERPROFILE%\Desktop\*%scfile%*.lnk (
- set "scp=%scp:\=\\%"
- ) else if exist %PUBLIC%\Desktop\*%scfile%*.lnk (
- set "scp=\\users\\public\\desktop\\"
- ) else (echo,%scfile% is nonexistent&pause&exit)
- set "scfile=%%%scfile%%%"
- for /f "tokens=2 delims==" %%i in ('wmic path win32_shortcutfile where "Path='%scp%' and extension='LNK' and FileName like '%scfile%'" get target /value') do (
- echo,"%%~dpi"
- md "%%~dpi123"
- )
- pause
复制代码
|