How to change the way dtSearch prints search results

Article: DTS0104

dtSearch generates a printable list of search results based on a template file, SearchListTemplate.rtf. The list generated from this file is then launched in your word processor, so you can edit or print it. If you select the "Report" format rather than the "List" format, then SearchReportTemplate.rtf is used.

Another way to save search results is to click File > Save Search Results As in dtSearch. This lets you save the search results list in XML or CSV (for importing into Excel).

To customize the template used to generate a search results list in RTF:

1. Use WordPad or Microsoft Word to open the file SearchListTemplate.rtf in your c:\Program Files\dtSearch\Template folder. You will see a document that looks like this:


Search Request: %%Request%%

     Total files: %%TotalFiles%%

     Total hits: %%TotalHits%%



%%Filename%% (%%Hits%% hits)

Location: %%Location%% Size: %%Size%% Last modified: %%Date%%


2. Edit the file to change the format and save the file as an RTF file. Do not save it as a DOC file because then dtSearch will not see the changes. Save the file in your dtSearch settings folder, not in the Template folder, so your changes will not be lost if you reinstall dtSearch. (Click Options > Change dtSearch Folder in dtSearch to find out where your settings folder is.)

dtSearch uses SearchListTemplate.rtf as a template to generate a printable version of the search results file. Text between the <<< and >>> markers defines the template for each search results item. Text before the first <<< marker is the header for printed search results. Text after the >>> marker is ignored.

For example, if you wanted to see the full path and filename for each document rather than just the name, you could edit the template and change %%Filename%% to %%Fullname%%.

The following symbols are used in this template:





Number of hits in the document


Name of the document. For PDF and HTML files, this will be the TITLE.


Full path and filename of the document


Modification date of the document


Location of the document


The file type (Microsoft Word, PDF, HTML, etc.


Size of the document


Size of the document in kilobytes


First 80 text characters of the document


The number of this item in the search results list


The path of the index that this document was found in


The date the search was performed


The date the search report was generated


Search request


Number of files retrieved in the search


Number of hits in all files retrieved in the search


Copyright © 1991-2022 dtSearch Corp. All Rights Reserved.  /  Terms of use  /  Privacy