Just thought I'd share this little code snippet for a batch (zipcurdir.bat) file that I use quite frequently.
Requires 7-zip but could be adapted for any other zip tool.
Then just put this little .bat file in any directories where you want to be able to super quickly make a uniquely timestamped zip file of the contents of the directory, and then move the zip file out of the way to the parent directory.
I use this all the time when I'm working on a project and it's not under version control and I want to make sure I have quick backups before something goes wrong.
Add any exclusion patterns you want to the extraoptions
line, and change 7-zip location if different; or maybe you want to change the destination folder..
for %%a in ("%cd%") do set "CurDir=%%~na"
set TIMEZERO=%TIME: =0%
set extraoptions=-xr!Temp -xr!Junk
set zcmd="c:\program files\7-zip\7z" a -t%zformat% -r %extraoptions%
echo %zcmd% ..\%fname% .\
%zcmd% ..\%fname% .\
As an example if I put this zipcurdir.bat file in my Documents\Arduino\ folder and run it, I get the file in the parent directory: "Arduino_220506_0615.zip"
The only thing neat about this batch file is the autonaming of the created file based on the current directory and the fact that you never have to modify the batch file no matter where you put it.