Another issue that hasn't been mentioned: dot. You want to match a literal '.', not an "anything except for newline" character, right? /\.txt$/
This isn't your only issue. But the other issues have already been addressed satisfactorily. I just can't stand looking at the unescaped metacharacter when I know you intended it to be a literal. :)
Dave
In reply to Re: code for serching .txt file through directories and sub directories
by davido
in thread code for serching .txt file through directories and sub directories
by hector89
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |