threers

All Tracks & Cars

Mar 7th, 2021 (edited)
158
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. SET playerfile=UserData\player\player.JSON
  3. for /f "delims=:" %%N in ('findstr /b /n /r /c:"^ *\"Game Description\":" %playerfile%') do set LineNum=%%N
  4. SET Replacement=    "Game Description":"All Tracks ^& Cars"^,
  5.  
  6. move /y %playerfile% %playerfile%.bak
  7. setlocal enableDelayedExpansion
  8. (
  9.    for /F "tokens=1* delims=:" %%a in ('findstr /N "^" %playerfile%.bak') do (
  10.       set "line=%%b"
  11.       IF %%a equ %LineNum% SET "Line=%Replacement%"
  12.       echo(!line!
  13.    )
  14. ) > %playerfile%
  15. endlocal
RAW Paste Data