cd x:\tmp → pushd x:\tmp / popd
または
if exist %failname% ( → if exist x:\tmp\%failname% (
な感じの悪寒