How to process multiple files at once

Im new to SR Modding, but some of the tools I have noticed, can only process one file at a time, like unpacking texture files. Below is a method to batch convert with these tools (this method works with all singe file applications, not just for SR files):

1. unpack all the files you want to convert including the str2 files.

2. open notepad and paste the following code in:
for %%i in (*.[param1]) do [param2] "%%i"

change "[param1]" to your file extension, in this case we are using "cpeg_pc"
change "[param2]" to the location of your converter/app. In this example im am using SR Textool by Yepoleb

This will look like this:
for %%i in (*.cpeg_pc) do srtextool.exe x -o extracted "%%i"

Save this as a .bat file in the same folder as the tool you are using. In this case as per the directions of the tool, I have the files I want to convert in the same folder as the tool, and I have created a folder called "extracted" to output the files to.


3. open the cmd prompt (you dont need administrative access), navicate to your folder and run the tool, and wait. it will output something like this:

4. check the folder that you extracted your textures to and they should all be in that folder.

NOTE: If you want to run just the command from the command line you can do that also, but you need to change the %%i to %i:
for %i in (*.cpeg_pc) do srtextool.exe x -o extracted "%i"

Hope that helps!

5. you can now convert/edit these with whatever tool you wish to use.