Welcome to the Mythicsoft Q&A site for:

- Agent Ransack
- FileLocator Lite
- FileLocator Pro

Please feel free to ask any questions on these products or even answer other community member questions.

Useful Links:

- Contact Us
- Help Manuals
- Mythicsoft Home
0 votes

I'm running a search from the command line and exporting the results as HTML. That works fine but due to the nature of the data I only want the first line exported. Is that possible?

asked by (1.6k points)

1 Answer

0 votes

From version 6.5 Build 1337 and higher there is a command line switch to restrict the number of output lines -ol [num], e.g. to restrict the output to the first line found:

 FileLocatorPro.exe "C:\MySearch.srf" -ol 1 -ofh -o "C:\Results.txt"

Earlier versions

In earlier versions of FileLocator Pro the easiest way to achieve the same result was to change the Configuration->Display settings to return just one line per file. However, this may not be desirable since it will affect other searches.

Alternatively, to do this for a specific search you could use the Custom (XSLT) export search format. There's a sample transform file that provides HTML export formatting:

C:\Program Files\Mythicsoft\FileLocator Pro\Sample Transforms\HTMLTransform.xsl

which just needs a little modification to export just the first line of a search. Find the line:

<xsl:apply-templates select="rslt:contents/rslt:line"/>

and replace it with:

<xsl:apply-templates select="rslt:contents/rslt:line[1]"/>
answered by (62.4k points)
...