FOR %F IN (*) DO perl -pe "" "%F" >> ..\newfile.txt #### perl -e "while (<*>) {open(F,$_) or next;while(){print}/}}" > ..\newfile.txt