rem change dir to the batch file dir cd /D "%~dp0" rem clear away the zip folder, if it exists rd FolderToZip /s/q rem create folder mkdir FolderToZip rem copy the log folder into the new folder xcopy logs FolderToZip\ /s/e/k/c rem copy the archive folder into the new folder xcopy archives FolderToZip\ /s/e/k/c rem copy the config.json into the new folder xcopy config.json FolderToZip\ rem copy a text list of the files in the root directory dir > FolderToZip//fileslist.txt