
Re: TPL Converter that adds type to PNG filename (is there 1
wilsoff wrote:
For those looking for a batch script to achieve this. Try:
Code:
for %%z in (*.tpl) do start tpl.exe "%%z" "%%~fz".png -tf
That used to remove the .tpl from the filename, but it doesn't do it on my computer anymore.
Actually, that won't work at all, at least on my end. You don't need the extra % on %%z (which causes it not to work). And if you don't want the .tpl in the filename, change "%~fz" to "%~nz". You also don't need to add start before tpl.exe, otherwise this will cause tpl.exe to launch in separate windows for each file being converted.
So a shorter and more stable parameter would be:
Code:
for %z in (*.tpl) do tpl.exe "%z" "%~nz".png
That will convert all TPL files in the same window, without leaving the .tpl in the file names.
And if you want to specify a folder in which to input and output your files and the .exe, it would be:
Code:
FOR %G IN ("path\to\input\folder\*.tpl") DO "path\to\tpl.exe" "%G" "path\to\output\folder\%~nG.png"
That is the one I used to convert my files. And I like the fact I could specify where to output my files, otherwise I would have to use another parameter to sort out the TPLs from PNGs. I am not a command line Guru, so I am just stating what has worked for me. Hope this helps.