Consider the paths:
dir1/hs/pfg001G.onename.csv.bam dir1/hk/pfg001G.anothername.txt.ubam dir2/hs/pfg002T.secondname.fa.fz dir2/hk/pfg002T.heythere