This seems easy in Linux, but I'm trying to print the names of *.pdf files within a directory and its subdirectories to an output file. I have perl installed on my windows machine. What's a simple way to do this?
Thanks, Jake
This seems easy in Linux, but I'm trying to print the names of *.pdf files within a directory and its subdirectories to an output file. I have perl installed on my windows machine. What's a simple way to do this?
Thanks, Jake
See the File::Glob module.
Specifically:
Using Perl, you should almost certainly be using the File::Find core module.
Not much different than Linux.
If you only want the filenames, you can do that with
If you also want subdirs,
If you aren't in that directory to start with
File::Find::Rule is often nicer to use than File::Find.
or simply