Q:

How to set a path in tcl like with cd in batch files?

I've been using Tcl language for a few days only, but I'm used to programming in other languages too; however, I can't find any reference anywhere as to how I could set the current directory or path as it can be done in batch language with the command cd.
I need this because I'm using Tcl to integrate several different programs. One of these has some apparent problems of recognizing the current path. If I execute it from a batch file, previously setting the path with cd and the folder where this program is, everything works fine.
However, if instead of using a batch file I use a basic Tcl script to call this program (I use exec), it doesn't seem to find the folder or files it needs, most likely because the relative paths it uses are mapped incorrectly.
Does anyone know an equivalent version of the batch cd for Tcl??
Thanks!!

A:

you can just use the TCL commands cd and pwd. That should be all you need. See http://www.tcl.tk/man/tcl8.5/TclCmd/cd.htm for more info.

A:

Here is a trick I learned running tcl scripts on a windows computer.  Put {} around the windows path and you won't have to edit all the '\' to '/' to make it work. That way you can cut and paste from windows explorer.
cd {C:\paste\your\desired\windows\path\directly\here}

