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

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

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