echo off REM setting directories and file names SET BACKUP_SRC_01=C:\Dev\eclipse-jee-2019-06-R-win32-x86_64\workspace\pdf-converter-openhtmltopdf SET BACKUP_SRC_02=C:\Users\STEVE\git SET BACKUP_SRC_03=D:\SQL SET BACKUP_TARGET=D:\Backup\workspace SET BACKUP_FILENAME_PREFIX=workspace for /f "tokens=2 delims==" %%I in ('wmic os get localDATETIME /format:list') do set DATETIME=%%I set DATETIME=%DATETIME:~0,8%%DATETIME:~8,4% REM executing BandiZip "C:\Program Files\Bandizip\Bandizip.exe" c -y -ex:".git;target;node_modules" %BACKUP_TARGET%\%BACKUP_FILENAME_PREFIX%_%DATETIME%.zip %BACKUP_SRC_01% %BACKUP_SRC_02% %BACKUP_SRC_03% REM open target directory start %BACKUP_TARGET%
* 현재로서는 -ex 옵션에 ant 스타일의 중간경로를 줄 수 없고, 무조건 정확한 이름 매칭으로 예외처리를 해야 한다고 한다.