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


As part of a search, I'd like to search an entire file path (not just the file name). Is there any way to do this?

Many thanks.


by (190 points)

1 Answer

0 votes

You can search the path with expression filters, e.g. to restrict to just 'Search' in the name you'd do something like this:

Look In: C:\Root;+Search

If you want to search both file and path at the same time then your best bet is probably a Script. A variation on the Sample Scripts\path_regex.js would work (ie instead of just comparing to Path compare to Path + FileName).

Step 1. Save this script to a file

e.g. fullpath_regex.js

var regExp = new RegExp( SearchParms.FilenameCustomParm, "i" );

function isValidFileName( strPath, strFileName )
    var bIsValid = true;
        bIsValid = regExp.test( strPath + strFileName );
    catch( e )	{}
    return bIsValid;

Step 2. Use the Scripting Tab to use the script

Specify the path to the new script and use the Parms field to enter your path expression, remember that it's a regular expression so special characters like '\' must be escaped, ie '\\'.

For example,

Parms: filelocator pro\\flpro

Will match any file that includes the path 'filelocator pro\flpro'.


by (83.1k points)

Thanks, I'll give that a go.