For example,
We have a folder
c:\files
The folder contains files like these:
abc_m2611somthing.pdf
abc_m2611somthing.dat
abc_m2611somthing.log
abc_m3849somthing.pdf
abc_m3849somthing.dat
abc_m3849somthing.log
xyz_s1654somthing.pdf
xyz_s1654somthing.dat
xyz_s1654somthing.log
New files are generated and moved to this folder every day. File names and extensions of these files are constant, except numbers in the middle, every day the 4 digits in new files will be different.
My task:
To write a batch which will take files with the same numbers, and archive them. The name of the archive must be the same as the file name.
The end result should looks like this:
abc_m2611somthing.zip
abc_m3849somthing.zip
xyz_s1654somthing.zip
Each of these archives consist all files with the same number.
The difficulty lies in the fact that the numbers are different every day.