Page 104 - 500
P. 104
copy f:\cartoons\Tom&Jerry
This copies the file F:\Cartoons\Tom to the current folder and then
executes the Jerry command - probably not what you wanted. You
might think that because no space comes before or after the &
symbol, the system will know that you are referring to the file
name Tom&Jerry. Not true. When a command symbol (such as the
ampersand) appears on the command line, whatever follows it is
assumed to be a command, space or no space. Use the caret as
follows to indicate that you are referring to a file name:
copy f:\cartoons\Tom^&Jerry
Alternatively, rather than using the ^ symbol, you can enclose a
file specification that includes command symbols (or other
troublesome characters, such as spaces) within quotation marks to
achieve the same effect. For example:
copy "f:\cartoons\Tom&Jerry"
Pausing or Canceling Commands
You can pause or cancel a command that you enter at the
command prompt. (Keep this in mind if you accidentally request a
directory of all the files - or worse, enter a command to delete all
the files - on a huge network server drive!)
To pause the output of a command, press Ctrl+S or the Pause key.
To resume output, press any alphanumeric key.
If you have QuickEdit mode enabled for your Command Prompt
window, simply click in the window to pause command output. To
resume output, right-click in the window.
To cancel a command, press Ctrl+C or Ctrl+Break. With either
key, your command is canceled and the command prompt returns.
Be aware, though, that any action (such as deleting files) that
occurs before you cancel the command is done - and cannot be
undone.
Using Environment Variables
Command-prompt operating systems traditionally use environment
variables as a means for programs to share information and read
global settings. (Windows 2000 - and applications written for
Windows 2000 - uses the registry for the same purpose.)