Skip to main content.

This page’s menu:

What it Does

The locate utility provides a lightweight fast search to find files on a Windows PC.

Windows XP and Vista file search functionality is flawed and very slow. This utility works much like the Linux locate utility, providing almost immediate search results.

How to use it

locate is a command line utility. From a command prompt, enter the command "locate", followed by a portion of the filename or path you wish to locate.

Find a file or directory
"locate windowsup"
will produce results similar to the following:
12/25/2008 9:49:04 PM c:\Windows\PolicyDefinitions\en-US\WindowsUpdate.adml
12/25/2008 9:49:04 PM c:\Windows\PolicyDefinitions\WindowsUpdate.admx
Find files modified in a particular timeframe
"locate -t1d"
will produce results with all files modified in the last day

The database locate uses will build in the background after installation, and be automatically updated each night via a scheduled task the installer creates. You can start using locate immediately after installation, but it will take a few minutes for the database to be populated. Searches during this time frame (immediately after installation) will not locate all files on disk.

Syntax

usage: locate [-build -friendly [additional paths] ] [search_string] [-tXy]
to index your files: locate -build
or to index with a disk/processor friendly build: locate -build -friendly
to index your files with additional drives: locate -build d: e:

to search for files updated in the last 5 days: locate -t5d
Supported intervals:
s = second
m = minute
h = hour
d = day
w = week
M = month
q = quarter
y = year

to search: locate somestring

Requirements

Windows XP or newer is required. This requirement is really only necessary as the installation uses the "schtasks" command to register a scheduled task that keeps the locate database updated. If you want you could certainly install on older versions of Windows and just manually configure a build command (see Usage above).

Feedback

Feedback including feature requests and bug reports can be provided at the locate feedback forum