Copy or rename a directory with all sub-dirs

Dear all,

i would like to copy or rename a directory in a file, including all sub-directories and objects contained.
Is there a simple way to do that in ROOT? Many thanks in advance!

best,
Max

Hi Max,

See root.cern.ch/root/html/TSystem.html#TSystem:Exec

Cheers, Bertrand.

Hi Bertrand,

I have a ROOT TFile with a TDirectory structure inside. I want to copy this file to a new one but changing the name of the top TDirectory contained in the file (keeping al sub-directories). I’m talking about TDirectories in a ROOT file not about file-system directories. Thanks anyway for you reply :wink:

best,
Max

Oops! Sorry, I missed this detail… :blush:

So this is currently not supported. See: root.cern.ch/root/html/TDirector … ry:SetName

Cheers, Bertrand.