chcp 1251
for /f %%A in ('dir /b /a:d') do 7za.exe a -tzip -mx0 -mtc=off -r %%~nA.pkg .\%%A\*
for /f "delims=" %%i in ('dir "*" /a:d /b') do rmdir /s /q "%%i"

for %%A in (*.pkg) do ( 
7za x -tzip -y -ir!"content" "%%~fA" -o"RES_MODS"
7za x -tzip -y -ir!"flora" "%%~fA" -o"RES_MODS" 
7za x -tzip -y -ir!"maps" "%%~fA" -o"RES_MODS" 
7za x -tzip -y -ir!"spaces" "%%~fA" -o"RES_MODS" 
7za x -tzip -y -ir!"speedtree" "%%~fA" -o"RES_MODS" 
7za x -tzip -y -ir!"vehicles" "%%~fA" -o"RES_MODS"  

)
del *.pkg
del 7za.exe
del autoinstall_[9.x].bat
del res_mods.bat
chcp 866
