Brian < > wrote in message news:<>...
> I'm fairly new to using Perl on Windows. I need to find all of the
> files in a folder and its sub folders that match a pattern. On UNIX I'd
> do:
>
> $FOUND = `find $DIRROOT -name "$PATTERN" -print`;
>
> Is there a way to do this on Windows using Perl and/or native Windows
> commands?
>
> Brian
Hi Brian,
If you want to find all of the files in a folder and its sub folders
that match
a pattern on Windows using Perl and/or native Windows commands I
cannot help.
I just do not have enough experience with Perl yet.
If the task is just to find all of the files in a folder and its sub
folders that
match a pattern no matter what kind of tool you will use, I would
suggest egrep.
egrep for Windows is a part of "GNU utilities for Win32". You can
download it from here:
http://unxutils.sourceforge.net/
You can use something like this:
egrep -lr PATTERN *.*
for example:
egrep -lr "^From|Subject|Date: " *.*