@ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION rem upx --ultra-brute 7zsd.sfx rem create the _update mkdir _update\payload cd _update rem copy the batch script xcopy /Y ..\update.bat . xcopy /Y ..\update.manifest . echo %DATE% %TIME% > update.properties svn info ..\db >> update.properties cd payload rem copy the files list in the manifest for /f "delims=" %%i in (../../update.manifest) DO ( if exist "..\..\db\%%i\" ( rem this is a directory, copy off of full path and name set target=%%~fi rem create the directory mkdir "!target:\NRCS\=\!" rem copy the files xcopy /Y "..\..\db\%%i" "!target:\NRCS\=\!" ) else ( rem this is a file, copy off of full path only set target=%%~pi rem create the directory mkdir "!target:\NRCS\=\!" rem copy the files xcopy /Y "..\..\db\%%i" "!target:\NRCS\=\!" ) ) rem back up to _update cd .. ..\7za a -mx=9 "-xr^!?svn\*" "..\update.7z" * cd .. copy /b 7zsd.sfx + update.config + update.7z update.exe del update.7z rd /q /s _update