I have a folder with 600 text files, I'm looking to zip together files with similar identifiers. So for instance I have 10 files with id001~ as the identifier, those 10 will be zipped in the same directory and so forth. So far I have a code that will zip 1 file when you hard code the file name. I'm not sure if this should read off a list or maybe specify some type of wildcard criteria for which files to zip
Any help is greatly appreciated.
Code: Select all
echo off
set archievePatch=id001~testfile3.txt
7z.exe a %archievepatch%.zip "%archievePatch%"
PATH :\Users\Jeffery\Desktop\TestFolder
pause
exit
This will output a zip file named: id001~testfile3.zip