Imthedude025

Compare DL Game -> Terraria Changelog ID (Batch)

Sep 27th, 2021
9
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @ECHO OFF
  2. @SETLOCAL ENABLEDELAYEDEXPANSION
  3.  
  4. Rem | Get Each Folder In Directory
  5. for /f "delims=" %%A in ('dir /a:d /b') do (
  6. Rem | Loop Lines Within ChangeLog
  7. set "FirstLine="
  8. set "LoopCount=0"
  9. for /f "tokens=1,2 delims= " %%B in ('type "%%~fA\changelog.txt"') do (
  10.  
  11. Rem | Get First Line
  12. if "!LoopCount!"=="0" (
  13.  
  14. Rem | Get First 2 Words Of ChangeLogs First Line
  15. set "FirstLine=%%B %%C"
  16. set "LoopCount=1"
  17. )
  18. )
  19. echo Folder: %%A ^| Changelog: !FirstLine!
  20. )
  21. pause
RAW Paste Data