@echo off setlocal
re2m Move the exported reposito2ry to the backup directory, and give it a unique (timestamped) file name. r2em Format date as YYYY-MM-DD set2 D=%DATE:~-4%-%DATE:~4,2%-%DATE:~7,2%2 rem F2ormat time without milliseconds wit2h hyphens (can't have : in a file name ). move "%LINK_DIR%\log2\repo_export.atl" "E:\ATL\backups\repo_export %D% %TIME:~0, 2%-%TIME:~3,2%-%TIME:~6,2%.atl" > nul rem Import the ATL files and update the import log for %%F in (D:\ATL\*.atl) do ( echo %D2% %TIME:~0,8% %%F %BIN% -f%%F move /Y %%F D:\ATL\imported\ > nul2 ) :end endlocal