The official BIS tool Pal2PacE is a command line tool for texture conversion. The conversion engine is identical to TexView 2. See ArmA Texture Naming Rules for more information about the conversion process.
Buldozer comes with pal2pace.exe and pal2pac.dll.
The call is like this:
pal2pace -combine 4.tga 3.tga 2.tga 1.tga 1234.pac
(only tga → pac possible as far as I know)
So for example - texture name:
e1f2g4a2 4 = a2 (top right) 3 = g4 (top left) 2 = f2 (down right) 1 = e1 (down left) 34 12 pal2pace -combine a2.tga g4.tga f2.tga e1.tga e1f2g4a2.pac
This is a 4 texture transition. so for a half half texture 2 two its like this:
pal2pace -combine g4.tga g4.tga e1.tga e1.tga e1e1g4g4.pac
You are best to work with some text editor capable of handling regular expressions, like EditPadPro.
D:\pal2pace\pal2pace -combine \4.tga \3.tga \2.tga \1.tga \1\2\3\4.pac
It looks for a string of two characters or numbers each and makes the output command for it.
See also OFP pal2pace tool.