0 votes

Hi,

I have FileLocator Pro.

I note that it is possible to call on script files.

I require a script that can draw on a list of keywords saved in different text files

For example

Text file %A% contains the keywords:

dog
cat
fish

Text file %B% contains the keywords:

Mary
Joan
Joseph

My hope is to be able to draw on such a script to conduct searches using the FileLocator Pro interface. For example, I could search using a regular expression (and drawing on the script) for "(text|text2) %A% %B%" and get a match for "text dog Mary" and "text2 dog Mary"

My only question is, would it be possible to create a script like that and call on it in the FileLocator Pro interface?

I don't know any programming myself, but I would like to hire someone to do this for me, but first I would need to know if something like this could be achieved.

Thank you

Simon

by (20 points)

1 Answer

0 votes

Yes you can load a text file in a script, but there might be a better way without using scripting. Can you describe the 'Use Case' of why you're wanting to load text from two separate files?


FYI, to load a text file in JScript you could do something like this:

var fso = new ActiveXObject("Scripting.FileSystemObject");
var file = fso.OpenTextFile ("c:\\test.txt", 1);
var contents = file.ReadAll();
by (30.3k points)
...