- @echo off
- set "FileName=Plain Craft Launcher 2.exe"
-
- set time1=%time%
- for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
- if exist %%a:\ (
- for /f "delims=" %%b in ('dir /a-d /s /b "%%a:\%FileName%" 2^>nul') do (
- set "FIV=%%~dpb"
- )
- )
- )
- if not defined FIV (
- echo 未找到文件,请确认你已经安装了PCL启动器。
- pause
- exit
- )
-
- set time2=%time%
- call :getTime "%time1%" "%time2%" "找到文件夹:%FIV%"
-
- (for /f "usebackq delims=" %%i in ("symenu.ldt") do (
- set "str=%%i"
- setlocal enabledelayedexpansion
- set "str=!str:[helpfill]=%FIV%!"
- echo=!str!
- endlocal
- ))>"%FIV%\PCL\Custom.xaml"
-
- set time3=%time%
- call :getTime "%time2%" "%time3%"
-
- rd /s /q "%FIV%\Help"
- robocopy "Help" "%FIV%Help" /e
-
- set time4=%time%
- call :getTime "%time3%" "%time4%"
- call :getTime "%time1%" "%time4%"
-
- echo 按任意键退出
- pause>nul
- exit
-
- :getTime
- set "t=%~1"
- set "t1=%~2"
- if "%t1:~,2%" lss "%t:~,2%" set "add=+24"
- set /a "times=(%t1:~,2%-%t:~,2%%add%)*360000+(1%t1:~3,2%%%100-1%t:~3,2%%%100)*6000+(1%t1:~6,2%%%100-1%t:~6,2%%%100)*100+(1%t1:~-2%%%100-1%t:~-2%%%100)"
- echo %~3 检索时间 %times% ms
- exit /b
复制代码
|