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?
Select all the files, press and hold the shift key, then right-click and select Copy as path. This copies the list of file names to the clipboard. Paste the results into any document such as a txt or doc file & print that. Then open notepad, open tempfilename, and print it from there.
Click in the address bar and replace the file path by typing cmd then press Enter. This should open a black and white command prompt displaying the above file path. Type dir /A:D. /B > FolderList.
Not much different than Linux.
dir *.pdf > fileyouwant.txt
If you only want the filenames, you can do that with
dir/b *.pdf > fileyouwant.txt
If you also want subdirs,
dir/s/b *.pdf > fileyouwant.txt
If you aren't in that directory to start with
dir/s/b C:\Path\*.pdf > fileyouwant.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With