JSI Tip 7380. How do I save the results of a file and folder search?

When you Search for Files and Folders, you can save the search arguments by pressing Save Search on the File menu.

I have scripted SearchResults.bat to save the search results.

To use SearchResults.bat:


1. Right-click SearchResults.bat and press Create Shortcut.

2. Rename the shortcut as SearchResults.

3. In the Properties of the shortcut, set Run to Minimized.

4. Press Apply and OK.

5. Move the SearchResults shortcut to your SendTo folder (%UserProfile%\SendTo).

After a Search:

1. Press CTRL+A to select all the found files, or manually select the ones that you want to save.

2. Right-click any one of the selected files and press Send To and SearchResults.

3. A SSYYYYMMDDHHMM.HTM file will be saved to your desktop. This file contains File:/// links to each of the selected files.

SearchResults.bat contains:

@echo off
call univdate
for /f "tokens=1,2* delims=: " %%i in ('time /t') do set TDHH=%%i&set TDMIN=%%j
set TD="%userprofile%\Desktop\SS%YY%%MM%%DD%%TDHH%%TDMIN%.HTM"
If \{%1\}==\{\} goto END
set file=%1
set file=%file:"=%
if not exist "%file%" shift&goto LOOP
@echo ^<A HREF="file:///%file%"^>%file%^</A^>^<P^>>>%TD%
goto LOOP

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.