call :regSub Database_Backup.reg :regSub if exist %1 ( echo %1 >> regimport.log reg import %1 >> regimport.log 2>&1 ) exit /b