Codesnippets > Macros

Macro: Update bin file on Wiz SD card

(1/1)

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


--- Code: GLBasic ---:: 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:

Navigation

[0] Message Index

Go to full version