Suggestion enhancement for record.bat and playback.bat
Posted: Mon Jun 18, 2012 9:01 pm
Barry,
Because it came up in the hi-jacked thread the Paul and I have been using to try to get his playback of a Wolf108 recording going correctly, I wonder if it would be worth doing an "if exist" check around the move statements in the record.bat and playback.bat files to avoid the "file not found" errors that get logged if the files don't exist?
For example, the record.bat file would now look as follows:
... and the playback.bat file would now look as follows:
Cheers,
BeeJay.
Because it came up in the hi-jacked thread the Paul and I have been using to try to get his playback of a Wolf108 recording going correctly, I wonder if it would be worth doing an "if exist" check around the move statements in the record.bat and playback.bat files to avoid the "file not found" errors that get logged if the files don't exist?
For example, the record.bat file would now look as follows:
Code: Select all
@echo off
if exist cfg\%1.cfg move cfg\%1.cfg cfg\%1.bak
if exist hi\%1.hi move hi\%1.hi hi\%1.bak
if exist nvram\%1.nv move nvram\%1.nv nvram\%1.bak
if exist diff\%1.dif move diff\%1.dif diff\%1.bak
mame %1 -record %2 %3 %4 %5 %6 %7 %8 %9
if exist cfg\%1.bak move cfg\%1.bak cfg\%1.cfg
if exist hi\%1.bak move hi\%1.bak hi\%1.hi
if exist nvram\%1.bak move nvram\%1.bak nvram\%1.nv
if exist diff\%1.bak move diff\%1.bak diff\%1.dif
Code: Select all
@echo off
if exist cfg\%1.cfg move cfg\%1.cfg cfg\%1.bak
if exist hi\%1.hi move hi\%1.hi hi\%1.bak
if exist nvram\%1.nv move nvram\%1.nv nvram\%1.bak
if exist diff\%1.dif move diff\%1.dif diff\%1.bak
mame %1 -playback %2 %3 %4 %5 %6 %7 %8 %9
if exist cfg\%1.bak move cfg\%1.bak cfg\%1.cfg
if exist hi\%1.bak move hi\%1.bak hi\%1.hi
if exist nvram\%1.bak move nvram\%1.bak nvram\%1.nv
if exist diff\%1.bak move diff\%1.bak diff\%1.dif
BeeJay.