0% found this document useful (0 votes)
3 views1 page

BAT Code

This script exports an ATL repository to a backup directory with a timestamped filename, then imports ATL files from a source directory to a target directory, logging the import details. It exports the repository to "E:\ATL\backups\repo_export" followed by the date and time formatted as YYYY-MM-DD HH-MM-SS, then loops through each ATL file in "D:\ATL\" to import it to "D:\ATL\imported\", logging the date, time, filename and import status each time.

Uploaded by

beckwith168
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

BAT Code

This script exports an ATL repository to a backup directory with a timestamped filename, then imports ATL files from a source directory to a target directory, logging the import details. It exports the repository to "E:\ATL\backups\repo_export" followed by the date and time formatted as YYYY-MM-DD HH-MM-SS, then loops through each ATL file in "D:\ATL\" to import it to "D:\ATL\imported\", logging the date, time, filename and import status each time.

Uploaded by

beckwith168
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

@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

You might also like