Hi Ofer,
By default the missing components of the path are not created (just for 'fopen(...)' or 'open(...)').
However, you can force their creation in the following way:
1. At file level, by adding the option 'mkpath=1' in the URL (e.g. 'root://theserver//new/path/file.root?mkpath=1')
2. Globally using the setting
XNet.Mkpath: 1
in the relevant .rootrc file ($HOME/.rootrc or $ROOTSYS/etc/system.rootrc or /etc/root/system.rootrc)
When this option is set, TXNetFile sets the 'kXR_mkpath' bit in the option field when opening the file.
Most likely xrdcp sets always this bit, which would explain the different behavior.
Hope it helps.
Gerri