Not exactly, but the function is there. To "find" a file, enter "dir
filename /s"
to look for a file with filename as part of the name in the current
directory.
If, instead you wanted to look in the windows directory for the file
enter
"dir c:\windows\filename /s" If you want to seach the complete c: drive,
enter dir c:\ filename /s" In all cases listed in this message the
switch
"/s" says to search the directory specified AND ALL subdirectories.
I forgot to mention that you can use "?" for an unknown character or
"*" for any number of unknown characters. That is "dir c:\ auto*.*"
will find the autoexec.bat file plus any others starting with auto and
ending with anything. "dir c:\a?t?e?e?.* will also find autoexec.bat
but posiibly some other files if every other letter would match
autoexec.
If you want the complete Microsoft explanation enter (at a DOS prompt)
"dir /?" and it will display the following message - everthing you ever
wanted to know :^)
Don Elias
-------------------------------------------------------------------------
----------------
Displays a list of files and subdirectories in a directory.
DIR [drive:][path][filename] [/P] [/W] [/A[[:]attributes]]
[/O[[:]sortorder]] [/S] [/B] [/L] [/V] [/4]
[drive:][path][filename]
Specifies drive, directory, and/or files to list.
(Could be enhanced file specification or multiple
filespecs.)
/P Pauses after each screenful of information.
/W Uses wide list format.
/A Displays files with specified attributes.
attributes D Directories R Read-only files
H Hidden files A Files ready for archiving
S System files - Prefix meaning not
/O List by files in sorted order.
sortorder N By name (alphabetic) S By size (smallest first)
E By extension (alphabetic) D By date & time (earliest
first)
G Group directories first - Prefix to reverse order
A By Last Access Date (earliest first)
/S Displays files in specified directory and all
subdirectories.
/B Uses bare format (no heading information or summary).
/L Uses lowercase.
/V Verbose mode.
/4 Displays year with 4 digits (ignored if /V also given).
Switches may be preset in the DIRCMD environment variable. Override
preset switches by prefixing any switch with - (hyphen)--for example,
/-W.
-------------------------------------------------------------------------
--------------------------
On Sun, 16 Jun 2002 22:08:23 +1200 Ian Porter <[log in to unmask]>
writes:
> Hey Don, I appreciate that info about the DIR command. I'm always
> doing DOS
> directory searches, and it's a pain in the butt to keep typing in
> the /on /p
> bit.
>
> Does that old grey matter remember if there's a 'FIND' facility in
> DOS?
>
> Ian Porter
> Computer Guys
> Arrowtown
> New Zealand
> [log in to unmask]
>
> ----- Original Message -----
> From: "Don Elias" .EDU>
> Sent: Sunday, June 16, 2002 6:07 PM
> Subject: Re: [PCSOFT] DOS Command
>
>
> > I scratched part of my head that used to contain all about DOS
> > and a few things came out.
> > 1. "SET" sets a variable named DIRCMD (in this case) in the
> > environment to the value "/O:N/P" You can verify this by typing
> > the command "SET" in DOS and it will respond with all the
> > environmental values including "DIRCMD=/O:N/P"
> > 2. The switches you are setting by this command are "/O:N"
> > and "/P" The switch "/O:N" says to Order the files by Name.
> > The switch "/P" says to pause after each Page of file names
> > are displayed on the screen.
> > 3. Now that information is stored in the environment so that
> > when the DOS command "DIR" (to display the contents of a
> > directory) the files will be automatically sorted by name and
> > will be displayed a page at a time. (Requires a carriage
> > return to display the next page)
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.370 / Virus Database: 205 - Release Date: 5/06/2002
>
> "Hold No Punches.." Rode brings you great shareware/freeware
> programs with his honest opinions in this weekly column.
> http://freepctech.com/rode
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today! For your FREE software, visit:
http://dl.www.juno.com/get/web/.
PCSOFT maintains many useful files for download
visit our download web page at:
http://freepctech.com/downloads.shtml
|