Author Topic: Macro: Update bin file on Wiz SD card  (Read 2909 times)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10667
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
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
 

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4977
  • O Rly?
    • View Profile
Re: Macro: Update bin file on Wiz SD card
« Reply #1 on: 2010-Jan-04 »
 :enc:

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

PC:
AMD RYzen 7 1700 @3.9Ghz, 16GB HyperX Fury 2666Mhz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard