B
bobdynlan
Guest
A lot of people use different sort of utilities that are commandline based to convert/edit/transform files. Most of them do not support using wildcards as it should, so you have to repeat the process for every file wich is annoying (valve's naming is not so intuitive ).
I sow somewhere people trying to do complex tasks involving explorer,notepad, excell and lot of editing to batch convert vtf files to tga & viceversa. It's true GUI's for them seems to be missing, but it's a simple solution, many people knows it. The BATch helper (adaptive to many toolz):
Just copy what is under CODE and save it as something.bat
Sry if I post something already discussed/well known, I have done a search on before. And the fact that some people are using all sort of gadgets like winamp playlist & excell proves that there are still few that skipped the batch programming.
I sow somewhere people trying to do complex tasks involving explorer,notepad, excell and lot of editing to batch convert vtf files to tga & viceversa. It's true GUI's for them seems to be missing, but it's a simple solution, many people knows it. The BATch helper (adaptive to many toolz):
Code:
@echo off
:: BATch helper, place it in the same dir as the tool used
:: edit the following two lines after = sign
SET TOOL=vtf2tga.exe
SET OUTEXT=tga
:: ------------------
if not exist %tool% goto error
:: if no parameters given, show help
if "%1"=="" goto about
:: other parameters can be added using the example
for %%c in (%3) do set tool=%%c
if not exist %tool% goto error
for %%b in (%2) do set outext=%%b
set v1nt=%%a
if Windows_NT == %OS% set v1nt=%%~na
for %%a in (%1) do call %tool% %%a %v1nt%.%outext%
goto end
:about
set batname=%0
if Windows_NT == %OS% set batname=%~nx0
cls
echo BATCH HELPER, (c) [email protected]
echo EDIT THIS BATCH UNDER 'SET TOOL=' SECTION WITH THE NAME OF THE TOOL USED
echo AND 'SET OUTEXT=' WITH THE OUTPUT FILE EXTENSION, SO THAT YOU CAN CALL
echo THE BATCH FILE ONLY WITH ONE PARAMETER, filename.ext or *.ext or *.*
echo SYNTAX (DEFAULT FOR vtf2tga):
echo %batname% *.vtf
echo %batname% c:\resource\*.vtf WITH OTHER PATH
echo %batname% *.vtf png CHANGE OUTPUT EXTENSION IF USING 2 PARAMETERS
echo %batname% *.mp3 wav mp3dowav.exe CHANGE THE TOOL USED IF USING 3 PARAMETERS
echo.
goto end
:error
set bdir=%9
if Windows_NT == %OS% set bdir=%~dp0
echo The tool named %tool% cannot be found. Verify that it's inside this directory
echo %bdir% and that you have typed the correct name (with extention).
goto end
:end
pause
if "%OS%"=="" cls
if "%OS%"=="" exit
Sry if I post something already discussed/well known, I have done a search on before. And the fact that some people are using all sort of gadgets like winamp playlist & excell proves that there are still few that skipped the batch programming.