Wildcarding file names with hadd on windows


Please read tips for efficient and successful posting and posting code

_ROOT Version: 6.24/06
_Platform: Windows
Compiler: Not Provided


I am having a minor problem using hadd to merge files. I have a large number of files, and when I try to combine them with wildcarding, I get an error:

hadd Target file: merged5.root
hadd compression setting for all output: 1
hadd Source file 1: user.abunka.*.ANALYSIS.root
Error in <TFile::TFile>: file D:\path\user.abunka.*.ANALYSIS.root does not exist
Error in <TFileMerger::AddFile>: cannot open file user.abunka.*.ANALYSIS.root
hadd exiting due to error in user.abunka.*.ANALYSIS.root

Clearly, it is not understanding the wildcard character, what can I do to fix this?
When I feed the file names in one at a time it works fine, but it is tedious to go through each one every time I need to merge files.
Thanks!

We’ll investigate. One possible workaround could be to list the files in a text file, something like:

D:\path\user.abunka.1.ANALYSIS.root
D:\path\user.abunka.2.ANALYSIS.root
D:\path\user.abunka.3.ANALYSIS.root
D:\path\user.abunka.4.ANALYSIS.root

and use this syntax:

hadd merged5.root @filelist.txt

OK, FYI the problem has been identified and will be fixed soon.

This is now fixed and will be included in the upcoming v6.26.00 release