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

How do I schedule a task to update indexes?

0 votes

I have built an index that I regularly search and would like to update it on a daily basis, can I do that with FileLocator Pro?

asked Jan 13 by dave (55,690 points)

1 Answer

0 votes

FileLocator Pro does not have scheduling functionality built into it but you can use Windows Task Scheduler to accomplish the task. The key tool to update an index is the command line app flpidx.exe.

For example to update the index 'Emails' you could run:

flpidx.exe -name "Emails" -update

You can then use the Task Scheduler command line app Schtasks.exe to schedule the update for 1pm on a daily basis:

schtasks.exe /Create /TN "FLPro Email Update" /TR "'C:\Program Files\Mythicsoft\FileLocator Pro\flpidx.exe' -name 'Emails' -update" /SC DAILY /ST 13:00 /RU user /IT 

Breaking down the parameters:

/Create     - Command to create a new task
/TN         - The task name
/TR         - The command to run, note the use of single quotes inside the double quotes
/SC         - The schedule, e.g. HOURLY, DAILY, WEEKLY etc.
/ST         - Start time
/RU         - User to run the task as (see User Accounts note below)
/IT         - Run only when user is logged in, alternatively you could use the /RP flag to specify the user's password

You can also use the Windows 'Task Scheduler' Desktop app to create/view/modify scheduled tasks.

User Accounts

The above example includes the /IT switch to schedule the task to only run when the user is logged in, which will also run the task Interactively with the user's session. Here's what it looks like in Task Scheduler:

interactive user

If, however, you want to run the task when the user is not logged in it gets a little more complicated.

Indexes are created or shared for specific user accounts so when updating an index it is important to run the update task as a user account which has been setup for the index. For example, if you try running the task as the Local System account it won't have an index configuration table, unless you specify -path, nor access to other account specific privileges such as network drives.

Run whether user is logged on or not

So, for the task to run properly non-interactively the task needs to be setup with the user's password:

Non-interactive task

Windows Credentials

Finally, if the index is either stored on a network drive or indexes network files all network credentials need to be stored with the user account. If when you try and access the network resource from, for example, Explorer and you are prompted to enter network credentials a scheduled task, which is running non-interactively and therefore can't ask for credentials, will simply fail with Access Denied.

You can use Credentials Manager to check whether or not the user's credentials for a network resource have been stored:

Windows Credentials

answered Jan 13 by dave (55,690 points)
edited Feb 1 by dave