How to add root files on command prompts?

Hi…

i have more than one root files (say file1.root, file2.root…) that contains same tree.

is there any way to merge each trees in a single root file
into a single tree using command on the terminal (command prompts) ?

regards,

hadd -f result.root file1.root file2.root fileN.root
where hadd is $ROOTSYS/bin/hadd

see also class TChain

Rene

Thanks…Rene…

regards,