@echo off
if exist cfg\drgninja.cfg move cfg\drgninja.cfg cfg\drgninja.bak
if exist hi\drgninja.hi move hi\drgninja.hi hi\drgninja.bak
if exist nvram\drgninja.nv move nvram\drgninja.nv nvram\drgninja.bak
if exist diff\drgninja.dif move diff\drgninja.dif diff\drgninja.bak

mame drgninja -record drgninja.inp %3 %4 %5 %6 %7 %8 %9 -nvram_directory NUL

if exist cfg\drgninja.bak move cfg\drgninja.bak cfg\drgninja.cfg
if exist hi\drgninja.bak move hi\drgninja.bak hi\drgninja.hi
if exist nvram\drgninja.bak move nvram\drgninja.bak nvram\drgninja.nv
if exist diff\drgninja.bak move diff\drgninja.bak diff\drgninja.dif
