glovemaster Posted February 21, 2007 Share Posted February 21, 2007 Is there a way to convert lots of TPC files at once? Doesn't have to be using TPC2TGA i'll happily download another program... Its just that: tpc2tga *.tpc *.tga doesn't work in the batch file for some reason, and KotOR Tool only extracts lots of condesending files for models... Thanks! Link to comment Share on other sites More sharing options...
Master Zionosis Posted February 21, 2007 Share Posted February 21, 2007 I've looked for this before, i can't find a way to do it, its a shame really, i get quite annoyed when i have to extract all the textures i want singly. Link to comment Share on other sites More sharing options...
glovemaster Posted February 21, 2007 Author Share Posted February 21, 2007 Ah buger.. lol Link to comment Share on other sites More sharing options...
tk102 Posted February 21, 2007 Share Posted February 21, 2007 Is there a way to convert lots of TPC files at once? Doesn't have to be using TPC2TGA i'll happily download another program... Its just that: tpc2tga *.tpc *.tga doesn't work in the batch file for some reason, and KotOR Tool only extracts lots of condesending files for models... Thanks! Here's a quick and dirty bulk mode application made from a Perl port of eiz's tpc2tga source code. I tried it on TSL's texture pack .tpc files, and about 1/2 of them were converted correctly. See if it works for you. Usage: bulktpc2tga input-path output-path Don't append the trailing slash to the paths and don't include any wildcards. Make sure your output path exists. http://www.starwarsknights.com/forumdl/bulktpc2tga.rar Link to comment Share on other sites More sharing options...
glovemaster Posted February 21, 2007 Author Share Posted February 21, 2007 Im saved! lol Thank you soooooooo much! Link to comment Share on other sites More sharing options...
tk102 Posted February 21, 2007 Share Posted February 21, 2007 Ha ha ha, here's another way... 1. Extract all .tpc files that you like to a directory. 2. Put the tpc2tga.exe file in that directory. 3. From the command prompt type: for %I in (*.tpc) do tpc2tga.exe %I %I.tga That will probably work better... note that your output files will be named filename.tpc.tga however.. Link to comment Share on other sites More sharing options...
glovemaster Posted February 21, 2007 Author Share Posted February 21, 2007 can i put that in a BAT file? Link to comment Share on other sites More sharing options...
tk102 Posted February 21, 2007 Share Posted February 21, 2007 Sure. If you did, though, you'd need to double your percent sign. Here though, is a .bat file that will do the proper naming for you and allow you to put the output into a separate direcotry. Copy and paste this code into a file called tpcbatch.bat. Put tpc2tga.exe in the same directory as tpcbatch.bat. @echo off setlocal ::TPCBATCH.bat :: provides a bulk method of converting tpc files :: to tga files using Eiz's TPC2TGA.exe program ::::::::: :: check usage ::::::::: if {%1} == {} goto :usage if {%2} == {} goto :usage set INPATH=%1 set OUTPATH=%2 ::::::::: :: does TPC2TGA.exe exist in this directory? ::::::::: for /f %%I in ('cd') do set EXEPATH=%%I if not %EXEPATH:~-1,1%==\ set EXEPATH=%EXEPATH%\ set EXEPATH=%EXEPATH%tpc2tga.exe if not exist %EXEPATH% goto :noexe ::::::::: :: make sure paths have backslash ::::::::: if not %INPATH:~-1,1%==\ set INPATH=%INPATH%\ if not %OUTPATH:~-1,1%==\ set OUTPATH=%OUTPATH%\ ::::::::: :: does the input directory have TPC files to work with? ::::::::: if not exist "%INPATH%*.tpc" goto :notpc ::::::::: :: does the output directory exist? :: if not, attempt to create it ::::::::: if not exist "%OUTPATH%." md "%OUTPATH%" if not exist "%OUTPATH%." goto :badoutpath ::::::::: :: if so, process them! ::::::::: for /f %%I in ('dir /b "%INPATH%*.tpc"') do call :work %%I goto :eof :usage echo Usage: echo tpcbatch [path to tpc files] [path to output tga files] goto :end :notpc echo No TPC files found in %INPATH% goto :end :noexe echo Could not find %EXEPATH% goto :end :badoutpath echo Could not create directory %OUTPATH% goto :end :work set TPCFILE=%1 set TGAFILE=%TPCFILE:.tpc=.tga% echo %EXEPATH% %INPATH%%TPCFILE% %OUTPATH%%TGAFILE% %EXEPATH% "%INPATH%%TPCFILE%" "%OUTPATH%%TGAFILE%" goto :eof :end Link to comment Share on other sites More sharing options...
glovemaster Posted February 22, 2007 Author Share Posted February 22, 2007 EDIT Dont listen to me.. lol Its great and i got it to work... Thankyou!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.