Macro: Update bin file on Wiz SD card

Previous topic - Next topic

Kitty Hello

This macro overwrites the gp2xwiz.prg program file for this project on an inserted SD card (any drive letter).

Code (glbasic) Select

:: Update WIZ program on the SD card if it exists
@ECHO OFF

IF "%GLB_PROJ_NAME%" == "" EXIT

CLS
FOR %%a IN (d e f g h i j k l m n o p q) DO (
IF EXIST "%%a:\game\%GLB_PROJ_NAME%.app.ini" (
IF EXIST "%%a:\game\%GLB_PROJ_NAME%.app\gp2xwiz.prg" (
ECHO Updating WIZ binary on %%a:
COPY /Y "%GLB_PROJ_PATH%\%GLB_PROJ_NAME%.app\gp2xwiz.prg" "%%a:\game\%GLB_PROJ_NAME%.app\gp2xwiz.prg"
PAUSE
GOTO:EOF
)
)
)


CLS
ECHO NO FILE "/game/%GLB_PROJ_NAME%.app.ini" ON SD-CARD FOUND!
PAUSE


Schranz0r

 :enc:

Ohhhhhhh MACROOOOOO :)
Nice one  :booze:
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard