How to batch convert PVR to PNG with PVRTexToolCLI

Hi, I use PVRTexToolCLI v5.3.0.0, I checked the PVRTexTool Command Line Documentation, and I used the following command to convert a single PVR:

PVRTexToolCLI -i D:\tex_t\new_01.pvr, -ics sRGB -noout -d

it works fine and correctly. But only one image can be converted at a time.
If I have a whole folder of 100 PVR files, how do I convert them to PNG?
I tried:

PVRTexToolCLI -i D:\tex_t\*.pvr,

but it doesn’t work.
Thank you!

Hi, Connor.

The best approach is to do it in a batch file. Create a process.bat file with something like this:

@echo off
FOR %%i in (D:\tex_t\*.*) DO (
echo processing %%i
PVRTexToolCLI -i "%%i" -ics sRGB -noout -d
echo - All files processed -

and just run it form the console.



1 Like

Hello, Carlos.

Thank you very much for your reply.
I used the script you provided and it worked perfectly!

best wishes to you.