-
-
Save DNA64/b03678030308b9817dd7b2297fafa841 to your computer and use it in GitHub Desktop.
Makes a list containing all games in gamefolder (hakchi2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::************************************************************************* | |
:: Filename: _make_list.bat | |
:: Author : keejelo | |
:: Version : 1.01 | |
:: Descr. : Makes a list containing all games in gamefolder. | |
:: Usage : Put the file into folder "hakchi2\games_snes" and then run it. | |
::************************************************************************* | |
TITLE Working, please wait... | |
ECHO OFF | |
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | |
SET outfile=_final_list.txt | |
DIR /S /B /O:N /AD > _tmp00 | |
FOR /F "tokens=*" %%a IN (_tmp00) DO ( | |
ECHO.&ECHO Extracting gameinfo.. | |
TYPE "%%a\*.desktop" >> "%~dp0\_tmp01" | |
CLS | |
) | |
ECHO.&ECHO Getting gametitles.. | |
FINDSTR /B "Name=" _tmp01 > _tmp02 | |
FOR /F "tokens=*" %%a IN (_tmp02) DO ( | |
SET line=%%a | |
ECHO !line:~5! >> _tmp03 | |
) | |
FOR /F "tokens=*" %%a IN (_tmp03) DO ( | |
SET /A N+=1 | |
ECHO - %%a >> _tmp04 | |
) | |
ECHO.&ECHO Sorting.. | |
SORT < _tmp04 > %outfile% | |
ECHO.&ECHO Cleaning up.. | |
DEL /Q _tmp0* | |
TITLE Finished | |
ECHO.&ECHO Ok, file created: %outfile% | |
ENDLOCAL | |
ECHO.&PAUSE | |
EXIT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment