Merging content of ROOT files

Hi Rooters,

I have the following problem. I have a large number of ROOT files with directories in it, containing plots.
How can I most conveniently merge these files into a single ROOT file, meaning copying all directories and their content into the new file? Thank you!


hadd -f result.root myfiles*.root
where hadd is in $ROOTSYS/bin/hadd

to read more about hadd, simply do

hadd ?