MAMEWorld >> News
View all threads Index   Flat Mode Flat  

lharms
MAME Fan
Reged: 01/07/06
Posts: 909
Send PM
Re: MAWS Resurrected in Java
11/14/13 06:24 PM


Let me introduce you to a more interesting command

the 'for' command prompt command

You could do something like this

FOR /F %y IN (inputlist288x224.txt) COPY 288x224.ini %y.ini
FOR /F %y IN (inputlist256x224.txt) COPY 256x224.ini %y.ini

So instead of 1000 little bits of copy you can have several basic lists of files. Feed them into the for command and it does the same thing depending on what is in the file. The %y bit is just substituted out.

You could get really fancy with it and have nested for loops. With a master list of the possible resolutions and another % var. You probably also could do a bit of csv parsing and just have 1 file.

FOR /F %x IN (reslist.txt) (
FOR /F %y IN (inputlist%x.txt) COPY %x.ini %y.ini
)

Then have a bunch of inputlistXXXxYYY.txt files with the proper game names in them. You are half way there with your spreadsheet.

Now I am writing this off the top of my head. I have had trouble in the past with the way () works in command script. So you may have to have it pass into another batch file to trick the built in parser.

Something like
batch #1
FOR /F %%x IN (reslist.txt) CALL batch2.cmd %%x

batch #2
FOR /F %%y IN (inputlist%1.txt) COPY %1.ini %%y.ini







Entire thread
Subject Posted by Posted on
* MAWS Resurrected in Java BadMouth 11/14/13 05:34 PM
. * Re: MAWS Resurrected in Java cutebutwrong  03/20/14 09:37 PM
. * You ask MAMEdev to..... Traso  11/15/13 08:19 PM
. * Re: You ask MAMEdev to..... Big Karnak  03/20/14 07:06 AM
. * Re: MAWS Resurrected in Java lharms  11/14/13 06:24 PM

Extra information Permissions
Moderator:  John IV, Robbbert, Tafoid 
2 registered and 129 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2658