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

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

1. Install the Send to X 1.4 PowerToy.

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 off
if \{%1\}

\{\} @echo Syntax: PrintSearch FileName \[/K\]&goto :EOF if not exist %1 @echo PrintSearch %1 - File not found.&goto :EOF setlocal set file=%1 set 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

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.