1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16:
@echo off set yourfolderpath=c:\whatever set zipbasepath=c:\temp :: format date string (expecting %date% to be like "Wed 06/30/2010") set datestr=%date:/=-% set datestr=%datestr:~4% :: format time string (expecting %time% to be like "22:00:12.96") set timestr=%time::=% set timestr=%timestr:~,-3% set datetimestr=%datestr% %timestr% set filename=ETC-%datestr%.zip set zippath=%zipbasepath%\%datetimestr% if not exist "%zippath%" mkdir "%zippath%" echo zipping *.txt and *.bak from "%yourfolderpath%\" into "%zippath%\%filename%" ::7zip commandline 7za.exe a "%zippath%\%filename%" "%yourfolderpath%\*.txt" "%yourfolderpath%\*.bak"