• Welcome to SCdev.org. Please log in.

Welcome to the new SCdev forums!

Create multiple sav files.

Started by hartleyshc, March 24, 2008, 09:22:15 PM

Previous topic - Next topic

hartleyshc

Anyone know of any commands/programs that would allow me to create a group of sav files based on the names of a group of roms?

note this is a question for nes/gbc/gb etc etc roms.
currently there is a lot of mouse click, ctrl-c, mouse click, ctrl-v going on, and it was getting too repetitive.


dantheman

Try this batch file on for size.  It scans the current directory for anything ending in .nes/.gb/.gbc/.sms/.pce and copies the blank 64 KB save file located at "C:\Program Files\SC\save.sav" to a new "CreatedSavs" folder with the game's specific name.  For instance, if you had "Mario.nes" and "Zelda.gbc" in the directory when you ran the program, it would create a "CreatedSavs" folder and put "Mario.sav" and "Zelda.sav" in there, which were both copied from the blank saver file in the Supercard patcher program's directory.  I could probably modify it to split up the save files into folders based on system if required, though this probably won't be a problem unless you've got hundreds of games you're putting on your card.

@echo off
IF NOT EXIST CreatedSavs MKDIR CreatedSavs
FOR %%F in (*.nes) do COPY /Y "C:\Program Files\SC\save.sav" "Createdsavs\%%~nF.sav"
FOR %%F in (*.gb) do COPY /Y "C:\Program Files\SC\save.sav" "Createdsavs\%%~nF.sav"
FOR %%F in (*.gbc) do COPY /Y "C:\Program Files\SC\save.sav" "Createdsavs\%%~nF.sav"
FOR %%F in (*.sms) do COPY /Y "C:\Program Files\SC\save.sav" "Createdsavs\%%~nF.sav"
FOR %%F in (*.pce) do COPY /Y "C:\Program Files\SC\save.sav" "Createdsavs\%%~nF.sav"


I've also attached the batch file directly to my post.  Unzip it and place it in any directory of your choosing before double-clicking it.

Obviously if the Supercard software is not installed, you'd need to find a different source of a blank 64 KB save file and modify the batch file accordingly.

hartleyshc

#2
exactly what i was looking for.
and sad to say, yes it is hundreds of files *which was exactly why i was looking for a batch files ;)*

un-goodmerged, divided in 1 folder per letter *except for always "s"*.

i also found out, for those who are using less roms *supercard software sets off my system beep when trying to open too many files at once, seems around 30-40 at once* you can use the supercard software, enable restart/save patch, and just delete the outputted roms, it will also output the sav files with the correct names.

update: copy/pasted the batch code. works great.
happy to say i haven't had to use batch files in quite a while, and all of the commands pretty much escape me these days. thanks for the quick reply.
did a little change, and this is what i use for my situation. *obviously just run it once in each directory, much less that what i was doing ;)*
@echo off
FOR %%F in (*.nes) do COPY /Y "C:\Program Files\SC\save.sav" "%%~nF.sav"
FOR %%F in (*.gb) do COPY /Y "C:\Program Files\SC\save.sav" "%%~nF.sav"
FOR %%F in (*.gbc) do COPY /Y "C:\Program Files\SC\save.sav" "%%~nF.sav"
FOR %%F in (*.sms) do COPY /Y "C:\Program Files\SC\save.sav" "%%~nF.sav"
FOR %%F in (*.pce) do COPY /Y "C:\Program Files\SC\save.sav" "%%~nF.sav"

dantheman

Hey, whatever works.  Glad you found it useful. 

To be honest the only reason I know how to do looping stuff like that is by looking at the "go.bat" file from Tepples's GBA GSM Player application.  I have to refer to it anytime I create something like that, lol.