There are several ways to accomplish this in a Windows command script. The simplest is to use the FOR file iterator command.
<pre>FOR %%a IN (“PATH\MYFILE.7z.*”) DO Some Work on %%a</pre>
Using FOR in this way will step through each file name matching the pattern. If you need more than one line of work code use a CALL and subroutine passing the filename. I would use a subroutine for a production script so I could log the actions and results for troubleshooting.
Other alternatives are the FOR numeric iterator using a IF NOT EXIST check and exiting the loop or SET /a and manually looping with a GOTO using an IF NOT EXIST check again.