Windows batch to launch toe file with a specific version

These days I’m working on projects across multiple builds of TouchDesigner. That often means that I’m switching back and forth between a latest stable and a previous stable based on the project or client. That’s all well and good, but when you’re working fast it’s easy to forget which build a project is based in… and if you update your installation with a toe file that you’ve saved in a later version you’re in for a handful of grumbles.

With that in mind here’s a handy batch script that you can use in your project directories to help you always use the right version of Touch when you’re working on projects.

rem turn off echo
@echo off

:: TouchDesigner build numbers
set TOUCHVERSION=2020.26630

:: set our project file target
set TOEFILE="project.toe"

:: set the rest of our paths for executables
set TOUCHDIR=%PROGRAMFILES%\Derivative\TouchDesigner.
set TOUCHEXE=\bin\TouchDesigner.exe

:: combine our elements so we have a single path to our TouchDesigner.exe 
set TOUCHPATH="%TOUCHDIR%%TOUCHVERSION%%TOUCHEXE%"

:: start our project file with the target TD installation
start "" %TOUCHPATH% %TOEFILE%

The parts of this script to edit are the TOUCHVERSION and the TOEFILE. This isn’t perfect, but boy will it save you a headache.

1 Like

To be honest for now I just go with the route of copying the whole touchdesigner installation into the Project and refference that installation. This way you can also relatively easily port the project without having to make sure that this specific version is installed. This also keeps yu from having to rewrite the start_bats as you can just refference the project toe and updating to a newer version is simply done by overwriting the TouchDesigner folder.

3 Likes

That’s definitely a power move @alphamoonbase