SyntaxFix
Write A Post
Hire A Developer
Questions
How about if you use grep instead of find?
ls | grep .txt$ > out.txt
Now you can read this file and the filenames are in the form of a list.