The name of the dataset should be an identifier, not a path. Because of how the name is treated internally it will mess up the GUI code if there are non-filename characters in it.
TMVA assumes that the output should be written to the current directory. You can always move the generated folders via scripts as a workaround.
I usually run the scripts “the other way around” when I want output at a specific location e.g.
cd ./path/for/output
root -l ../../path/to/scripts
What if I have some process (say MainProcess.C) that includes TMVA training and application processes and I need loop this process over some data array which assumes the creation (or recreation if exists) new folder for each data entry. So I want “dataset” to be in a corresponding folder. I do not want to run MainProcess.C every time from new dir (at least not by hand). What am I suppose to do in this case.
What I did last time was to create a Python wrapper that runs the training script in a scratch area and then moves the result to the desired final location.
Sketch of the python script below. Missing error handling, command line arguments and possibly more.
With the argparse module it is quite easy to make a script that will loop over a set of training/application scripts. os.makedirs could also be useful.
If you end up doing something else, please outline the approach so others can learn