Changing default directory for accessing macros

I know that on executing any macro, root looks for the file in root/macros directory, how do you change that directory, let’s say for accessing tutorials?


Please read tips for efficient and successful posting and posting code

ROOT Version: 6.18/04
Platform: Windows 10

Compiler: Not Provided


C:\Users\bellenot>cd %ROOTSYS%\tutorials

C:\Users\bellenot\build\debug\tutorials>root -l

Welcome to the ROOT tutorials


Type ".x demos.C" to get a toolbar from which to execute the demos

Type ".x demoshelp.C" to see the help window

==> Many tutorials use the file hsimple.root produced by hsimple.C
==> It is recommended to execute hsimple.C before any other script

root [0]

Does this method for any directory (even the ones present anywhere in the system)?

Yes, you can simply go to the preferred directory before starting ROOT, or you can also start ROOT and then type gSystem->cd("any_directory") (for example):

C:\Users\bellenot\build\debug>root -l
root [0] gSystem->cd("tutorials")
(bool) true
root [1]

Thanks You :), apparently I can’t write just thank you so rest of it is salad text