Tutorial for using cygwin for batch operations.

More
18 years 8 months ago #18752 by Jasper
I've finished my tutorial on doing bulk operations on files using cygwin:

pointless.net/eoc/cygtut/

Includes:

Converting all the .ftu files in a directory to .iff
Converting all the .ftu files in the resource directory to .iff
Converting all .pso files in the resource directory to .lwo

Very rough around the edges atm, let me know if you spot any particulary glaring mistakes!



---
If there is hope it lies with the demo scene.
PSO and FTEX tools: pointless.net/eoc/

---
If there is hope it lies with the demo scene.
PSO and FTEX tools: pointless.net/eoc/

Please Log in or Create an account to join the conversation.

More
18 years 8 months ago #14937 by Shane
Wonderful! Now we don't have to manually convert each PSO on an object by object basis. That was eating up loads of time.

[n00b] Will installing the required tools interfere with any programs or system specs? [/n0ob] :D

Please Log in or Create an account to join the conversation.

More
18 years 8 months ago #14938 by Jasper

Originally posted by Shane

Wonderful! Now we don't have to manually convert each PSO on an object by object basis. That was eating up loads of time.

[n00b] Will installing the required tools interfere with any programs or system specs? [/n0ob] :D


shouldn't do.


---
If there is hope it lies with the demo scene.
PSO and FTEX tools: pointless.net/eoc/

---
If there is hope it lies with the demo scene.
PSO and FTEX tools: pointless.net/eoc/

Please Log in or Create an account to join the conversation.

More
18 years 8 months ago #14954 by cambragol
Wow. That is a seriously comprehensive tutorial. And a seriously difficult install. However, I am going to set it up, because I really need to get all those PSO objects translated. Thanks a lot Jasper!

Please Log in or Create an account to join the conversation.

More
18 years 8 months ago #14961 by cambragol
Went throught the tutorial and converted all the PSO objects and textures without a hitch.

Please Log in or Create an account to join the conversation.

More
18 years 8 months ago #14991 by Haarg
With Window 2000 or XP, you can do the same scripting with normal batch files.

Convert police interceptor .ftu files to .iif files:
Code:
cd resource/avatars/policeinterceptor for %%d in (*.ftu) do ( echo %%~d dftex -q "%%~d" "%%~dpnd.ppm" ppmtoilbm -24force -nocompress "%%~dpnd.ppm" > "%%~dpnd.iif" del /f /q "%%~nd.ppm" )
Recursive:
Code:
for /r %%d in (*.ftu) do ( echo %%~d dftex -q "%%~d" "%%~dpnd.ppm" ppmtoilbm -24force -nocompress "%%~dpnd.ppm" > "%%~dpnd.iif" del /f /q "%%~nd.ppm" )

Convert .pso to .lwo recursively
Code:
for /r %%d in (*.pso) do ( echo %%~d pso2lwo --quiet --output="%%~dpnd.lwo" "%%~d" )

Save as .bat or .cmd and run. They could be typed directly into a command prompt, but all %%'s would need to be replaced with %'s.

Bash definately has more powerful scripting capabilities, but these examples are simple enough that it would be a waste to install Cygwin just for them.

Please Log in or Create an account to join the conversation.