in reply to Re^2: Read all the file path having text document
in thread Read all the file path having text document

Compare your code to the code produced by find2perl / -type f -iname '*\.txt'

Depending on your computer and disk specs, 4 minutes may not be all that bad.