Last active
October 30, 2019 10:24
-
-
Save aabir/ccc6e9044a63546bf87c626cf6750067 to your computer and use it in GitHub Desktop.
Create a zip file from batch command using 7zip exclude file or folder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo on | |
for /f "tokens=1,2,3 delims=:. " %%x in ("%time%") do set t=%%x%%y%%z | |
set time=%t% | |
set sevenZip="C:\Program Files\7-Zip\7zG.exe" | |
set outputFld="C:\Users\Shible.Noman\Desktop\ZipperBat\" | |
set fileToZip="C:\Users\Shible.Noman\Desktop\ZipperBat" | |
Echo zipping... | |
%sevenZip% a -tzip %outputFld%"zipped_%t%.zip" -r %fileToZip%"\*.*" -xr!zip.bat -xr!.gitignore | |
echo Done! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment