JSI Tip 8693. How do I print the results of a Windows Explorer search?

Jerold Schulman

November 16, 2004

1 Min Read
ITPro Today logo in a gray background | ITPro Today


To print the results of a file search that you performed in Windows Explorer, or My Computer:

1. Install the .

2. Click in the right-hand Search Results pane and press CTRL+A to select all the objects.

3. Right-click any highlighted object and press Send To and Clipboard as Name.

4. Open Notepad.exe and press CTRL+V to paste the found objects.

5. Print the result.

If you want the report to contains attributes, date, time, size, and fully qualified file name:

1. Save the open Notepad.exe to a text file.

2. Run:

PrintSearch FileName [/K]

where FileName is the file you saved in step 1, and /K is an optional parameter to will prevent FileName from being deleted after the report is printed.

PrintSearch.bat contains:

@echo offif {%1}
{} @echo Syntax: PrintSearch FileName [/K]&goto :EOFif not exist %1 @echo PrintSearch %1 - File not found.&goto :EOFsetlocalset file=%1set wf="%TEMP%PrintSearch.tmp"if exist %wf% del /q %wf%for /f "Tokens=*" %%a in ('type %file%') do ( @echo %%~ftzaa>>%wf%)if /i not {%2}
{/K} del /q %file%notepad.exe /p %wf%del /q %wf%endlocal



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like