FreeDOS help system (hhstndrd 1.0.8 en)[locate]

Command: locate

LOCATE is a file finder for DOS.


LOCATE [filespec] [options] The filespec may contain a drive letter, directory name, or both. If a drive letter is specified, only that drive will be searched. If no drive is specified, Locate will decide for itself which drives to search. Everything before the last backslash in the filespec is assumed to be the name of a directory to search; Locate will search that directory and any subdirectories it contains. If a directory name is specified, but no drive letter, the directory is assumed to be on the current drive; only the current drive will be searched. Wildcards are not permitted in the directory name.


What to search for: /D Both files and subdirectories (the normal default). /D- Files only, no subdirectories (default with /B /K /X /S: /0). /D+ Subdirectories only, no files. /H Hidden or system items only. /X Executable files only (.COM .EXE .BAT). /0 Empty (0-byte) files only. /S:[min][,max] Files within a size range. /D:[min][,max] Items within a range of Dates. /D:dowlist Items from specific days of the week. /T:[min][,max] Items within a range of times. /A:[a+][a-] Mask by Attributes. Where to search: /T Current directory and search path only. /NR Do not recursively search subdirectories. /R Local fixed disks only. /M Include duplicate network drive mappings. /E:var Directories listed in an environment variable. How to display found items: /P Peter-style display, with dates, times, attributes, and sizes. /I With index numbers, dates, times, attributes, sizes. /W Wide display. /N Bare naked display (file list). /B:"command" As a batch file. /L Using Windows 95 long filenames. /O:"string" Formatted output using macros. /S Summary info only. /US Use United States date and time format (Tue May 31 1994). /UK Use United Kingdom date and time format (Tue 31 May 1994). /UJ Use Japanese (ISO) date and time format (Tue 1994-05-31). /12 12-hour time format. /24 24-hour time format. /NP No paging. What to do with found items: /G Go to directory. /K Kill (delete) found items. /C:"string" Execute Commands, using the same macros as /O. /F:n Stop after First n items. Other options: /Y Yes -- don't prompt for /K or /C. /NV No Video BIOS calls. /V Swap spacebar and Enter key when paging. /NA Do not romanize letters for comparison.


Please read locate.txt for more information.


locate find all files and directories ("items") locate *.SYS find all items with a .SYS extension locate /H find all hidden or system items locate *.SYS /H find hidden/system items with .SYS extension

See also:

- nowhere - ------------------------------------------------------------------------------ Copyright (C)2008 W. Spiegl. This file is derived from the FreeDOS Spec Command HOWTO. See the file H2Cpying for copying conditions.