下面的笨办法也可一步完成,要求不高的推箱爱好者可以收藏,下次 Sokoban YASC 升级时也可以用:- @echo off
-
- color 17
- echo.
- set F="%USERPROFILE%\Documents\Sokoban\Sokoban YASC\Levels\"
- if not exist ~temp md ~temp
- copy %F%*.sok ~temp\>nul
- echo 正在对关卡答案解锁,并保存为TXT文本,请稍候 ...
- if exist "~temp\Crazy Monk.sok" ren "~temp\Crazy Monk.sok" Crazy_Monk.sok
- if exist "~temp\du Peloux.sok" ren "~temp\du Peloux.sok" du_Peloux.sok
- setlocal enabledelayedexpansion
- for %%a in (~temp\*.sok)do (
- for /f "delims=" %%i in (%%a)do (
- set m=%%i
- if "!m:~0,8!" == "Solution" (echo !m:~0,8! !m:~8!)else echo !m!
- )>>%F%%%~na.txt
- )
- echo 解锁完毕,按任意键完成操作!
- pause>nul
- ren %F%Crazy_Monk.txt "Crazy Monk.txt"
- ren %F%du_Peloux.txt "du Peloux.txt"
- if not exist ~temp\*.txt rd /s /q ~temp
- goto:eof
复制代码
|