Anyone know how to use vtf2tga?

d'keesto

Newbie
Joined
Nov 22, 2004
Messages
123
Reaction score
0
This is really going to save time on the Half-Life: Source texture pack project.

I want to batch convert a bunch of textures and retain filenames.

I can't figure out how to use the converter though. Help?
 
That's what I thought, but the command window immediately closes after it opens and nothing happens. Does the source file need to start out in a certain location?
 
hmmm... I haven't actually used it... somone else have any ideas?
 
I figured out that you can do one texture at a time by going into the command prompt, moving to the directory with vtf2tga.exe, and typing vtf2tga texturename.vtf texturename.tga

However, that takes forever. Anyone know of a way to do a batch conversion?
 
SOLVED!

I searched all over the internet to figure out how to write batch files.

Save this as a bat file and put it in the same directory as vtf2tga.exe:

Code:
@ECHO OFF
echo Usage: Place all vtfs to be converted and this bat file
echo in the same directory with vtf2tga.exe.  The converted 
echo tgas will be in a folder called tgas.
pause
mkdir tgas
for %%f in (*.vtf) do vtf2tga %%f tgas\%%f
ren tgas\*.vtf *.tga
cls
set /p userinp=Delete originals?(y/n)
set userinp=%userinp:~0,1%
if "%userinp%"=="y" goto delete
goto end
:delete
del *.vtf
:end

Windows XP/2000 will also give you the option to delete originals.
 
d'keesto said:
SOLVED!

I searched all over the internet to figure out how to write batch files.

Save this as a bat file and put it in the same directory as vtf2tga.exe:

Code:
@ECHO OFF
echo Usage: Place all vtfs to be converted and this bat file
echo in the same directory with vtf2tga.exe.  The converted 
echo tgas will be in a folder called tgas.
pause
mkdir tgas
for %%f in (*.vtf) do vtf2tga %%f tgas\%%f
ren tgas\*.vtf *.tga
cls
set /p userinp=Delete originals?(y/n)
set userinp=%userinp:~0,1%
if "%userinp%"=="y" goto delete
goto end
:delete
del *.vtf
:end

Windows XP/2000 will also give you the option to delete originals.

I love batch files. Good job!
 
Wont "vtf2tga -i c:\source\*.vtf -o c:\destination\" work?
This should just copy them and convert them all with same name.
 
Ive tried the

@ECHO OFF
echo Usage: Place all vtfs to be converted and this bat file
echo in the same directory with vtf2tga.exe. The converted
echo tgas will be in a folder called tgas.
pause
mkdir tgas
for %%f in (*.vtf) do vtf2tga %%f tgas\%%f
ren tgas\*.vtf *.tga
cls
set /p userinp=Delete originals?(y/n)
set userinp=%userinp:~0,1%
if "%userinp%"=="y" goto delete
goto end
:delete
del *.vtf
:end

But no tgas are created in the directory... just the folder.

Any ideas?
 
MetalPiranha said:
Ive tried the

@ECHO OFF
echo Usage: Place all vtfs to be converted and this bat file
echo in the same directory with vtf2tga.exe. The converted
echo tgas will be in a folder called tgas.
pause
mkdir tgas
for %%f in (*.vtf) do vtf2tga %%f tgas\%%f
ren tgas\*.vtf *.tga
cls
set /p userinp=Delete originals?(y/n)
set userinp=%userinp:~0,1%
if "%userinp%"=="y" goto delete
goto end
:delete
del *.vtf
:end

But no tgas are created in the directory... just the folder.

Any ideas?

Sorry for bringing up an old post but this is just the problem I have.. Anyone who knows what I should do?
 
Back
Top