concatenate text files in multiple folders
You can do with a simple script:

#!/bin/bash

directories="/your/path/dir1 /your/path/dir2 /your/path/dir3"

for d in $directories
do
        cat $(find $d -name "*.txt") &gt; $(echo $d | sed 's/\///g').txt
done


This script will concatenate every txt file on /your/path/dir1 and saves it as yourpathdir1.txt in your actual path. Then will do the same with dir2 and dir3.