February 28th, 2002, 06:32 AM
|
#4 (permalink)
|
| Ultimate Member
Join Date: Oct 2001
Posts: 1,542
|
Hmm. Are you running XP Professional? If so running hh ntcmds.chm will bring up the helpfile on the XP command line.
Otherwise, a batch file is a text file with the extension .bat that consists of a series of DOS commands on subsequent lines. DOS reads the batch file and executes each line in turn as if it was typed in at the command prompt. There's slightly more to it than that - some basic flow control and variable support, like a script file. Batch files have been part of DOS since the early days, recently they have been somewhat superceded by the Windows Scripting Host (VBScript/JScript) but batch files still remain the easiest way to quickly automate simple tasks.
As for the switches on find, /c means to just count the number of occurences (rather than outputting every single line that the search string appears in), /i means that it the search is case insensitive. Type find /? at the command prompt for more.
Here's what Microsoft say about batch files: Quote:
Using batch files
With batch files, which are also called batch programs or scripts, you can simplify routine or repetitive tasks. A batch file is an unformatted text file that contains one or more commands and has a .bat or .cmd file name extension. When you type the file name at the command prompt, Cmd.exe runs the commands sequentially as they appear in the file.
You can include any command in a batch file. Certain commands, such as for, goto, and if, enable you to do conditional processing of the commands in the batch file. For example, the if command carries out a command based on the results of a condition. Other commands allow you to control input and output and call other batch files.
| |
| |