View Full Version : Print all files in a directory which contain XXX
03-09-2003, 06:07 PM
I need to print all the files in a directory if the contain a certain word. All files are HTML files.
03-09-2003, 07:07 PM
You just want a list printed? What I usually do is just play around with DOS commands, and pipe it into a text file, and then print the text file.
C:\> dir/w *.html > htmlfiles.txt
or something of that nature
03-09-2003, 07:19 PM
I need to print the contents of the file.
Not only that the file must contain a word or phrase
03-10-2003, 12:00 AM
One way you could do it in Windows XP (probably modifiable for other Windows OSes) would be:
Go to Start -> Search
Choose "All files and folders"
Enter *.html under "All or part of the file name" (or HTM or whatever extension you use for HTML files)
Enter (whatever text you are searching for) under "A word or phrase in the file"
Click the arrow on the "Look in" combo box and select "Browse..."
Select the folder that has the files you want to search
If you don't want it to search subfolders, click the double down arrow next to "More advanced options" and deselect search subfolders.
Click the "Search" button.
All the files you are looking for should appear in the right pane. Now, select all of the files. Right-click on any one of the selected files and choose "Print".
The biggest downside to this is that you will have to press OK to the Print dialog once for each file.
03-10-2003, 07:47 AM
Great solution, Thanks a million. Worked like a charm. I need to dig up one of those mouse recording programs, then I can be even lazier and I don't have to click print a million times. Thanks again. It worked great.
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.