@echo off set KEY= for /d %%d in (?????????) do ( echo %%d if exist %%d_ZIP rd /s /q %%d_ZIP mkdir %%d_ZIP psvimg-extract.exe -k %KEY% %%d\app\app.psvimg %%d_ZIP\app psvimg-extract.exe -k %KEY% %%d\appmeta\appmeta.psvimg %%d_ZIP\appmeta psvimg-extract.exe -k %KEY% %%d\license\license.psvimg %%d_ZIP\license xcopy %%d\sce_sys %%d_ZIP\%%d\sce_sys\ /s /e ) pause