split flatten files into two flatten and flatten recursive