Use either the native Windows Command
Prompt (cmd.exe), or the Windows PowerShell, discussed
later in this chapter.
When you open a Command Prompt window, you??™ll see a window that looks
like the one shown in Figure 9-3. The cursor indicates the command line
(where commands are typed), and the prompt usually shows the current working
directory (here, C:\Users\Cory\AppData\Local), followed by a caret (>).
To run a program or execute a command, just type the name of the program
or command at the command line (also called the ???C??? prompt because
it usually looks like C:\>), and press Enter.
Some Command Prompt applications simply display information and then
exit immediately. For example, Figure 9-3 shows some output from the
Active Connections utility (netstat.exe) discussed in ???Scan Your System for
Open Ports??? in Chapter 7.
Command Prompt Scripting | 553
Scripting and
Automation
DOS Commands
You should know the following basic DOS commands to be able to complete
some of the solutions in this book and get by in the world of Windows.
The commands shown here are in constant width, and any
parameters (the information you supply to the command)
are in constant width italic. Optional parameters are shown
in [square brackets]. It doesn??™t matter which case you use
when you type them in the Command Prompt (DOS, like
Windows, is not case-sensitive). If there is more than one
parameter, each is separated by a space.
attrib attributes filename
Changes the attributes of a file or folder.
Pages:
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771