|
- @echo off
- Setlocal enabledelayedexpansion
- reg query HKU\S-1-5-20>nul || echo;CreateObject^("Shell.Application"^).ShellExecute "%~f0", "", "", "runas", 1 > "%temp%\getadmin.vbs" && cscript //b "%temp%\getadmin.vbs" && exit /b & del "%temp%\getadmin.vbs" /f /q>nul 2>nul
- pushd "%CD%"&& CD /D "%~dp0"
- FOR /f "delims=" %%i IN (ls.txt) DO (
- set a=%%~di
- set a=!a:~,1!
- for /f "delims=" %%a in ('echo "%%~nxi"^|find /v "."') do (
- md "%USERPROFILE%\desktop\目录结构\!a!%%~npxi")
- for /f "delims=" %%a in ('echo "%%~nxi"^|find "."') do (
- md "%USERPROFILE%\desktop\目录结构\!a!%%~pi"&cd.>"%USERPROFILE%\desktop\目录结构\!a!%%~npxi")
- )
- pause>nul
复制代码 |
|