Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Fri Sep 21, 2018 2:40 am

All times are UTC

Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Aug 13, 2018 6:22 pm 

Joined: Mon Aug 13, 2018 6:15 pm
Posts: 1
Hi there!

I use the following batch file to mass extract game files:

@echo off

rem Set directories. Can be changed.
set bfbb_gameroot="<REMOVED FOR FORUM POST>"
set bfbb_export="<REMOVED FOR FORUM POST>"

rem --- Script start ---

rem Prompt user for map directory and map file name
set /p bfbb_mapdir="Enter map directory (e.g. bb):"
set /p bfbb_mapid="Enter map id (e.g. BB01):"

set bfbb_extract="%bfbb_export%\%bfbb_mapdir%"

rem Create output directory
md "%bfbb_extract%"

rem Extract files
quickbms "%cd%\SpongeBobBBBPS2hop.bms" "%bfbb_gameroot%\%bfbb_mapdir%\%bfbb_mapid%.HOP" "%bfbb_extract%"

rem Copy and rename texture files
md "%bfbb_extract%\tex"
copy "%bfbb_extract%\*.RWTX" "%bfbb_extract%\tex\*.txd"

echo Done! Press any key to exit
exit /b

But I get this output from QuickBMS:

QuickBMS generic files extractor and reimporter 0.9.0
by Luigi Auriemma
e-mail: me@aluigi.org
web:    aluigi.org
        (Jun 17 2018 - 11:49:55)

                   quickbms.aluigi.org  Homepage
                            zenhax.com  ZenHAX Forum
                     @zenhax @quickbms  Twitter & Scripts

Error: wrong command-line argument (<REMOVED FOR FORUM POST>\SpongeBobBBBPS2hop.bms)

What am I doing wrong?

PostPosted: Tue Aug 14, 2018 12:57 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 8801
Spaces in the bfbb_* directories that enable the usage of the quote.
Replace quickbms with echo and you will get what I mean, the double quote:
"c:\\SpongeBobBBBPS2hop.bms" ""c:\xxx xxx"\bb\bb01.HOP" """c:\xxx 2"\bb""

This stuff is ever a pain, take a look here:

you can also use the -v option after quickbms for debugging the interpretation of the command-line without echo, long story short it's rare but in some particular occasions there is a difference in how the arguments are handled by C/C++ programs and, for example, .NET. It's not this case but it's just something interesting to know :D

Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited