This section describes how to copy a
single file and a group of files. Copying files creates
a duplicate of the original file and
does not remove the original file. This is useful for
many reasons. For example, if you want
to work on a document at home, you can copy it
from your computer at work to a floppy
disk and then take the floppy disk home.
To copy a file, you will use the copy
command. When you use the copy command, you
must include two parameters. The first
is the location and name of the file you want to
copy, or the source. The second is the
location to which you want to copy the file, or the
destination. You separate the source
and destination with a space. The copy command
follows this pattern:
copy source destination
Copying a Single File
In this section, you will copy the
notepad.exe files from the WINDOWS directory to the FRUIT
directory. You will specify the source
and destination of these files in two different ways. The
difference between the two methods is
explained at the end of this section.
Before you begin this section, make
sure the command prompt looks like the following:
C:\FRUIT>
To copy the NOTEPAD.EXE files from the
WINDOWS directory to the FRUIT directory
1. Return
to the root directory by typing the following at the command prompt:
cd\
The command prompt should now look like
the following:
C:\>
Change to the DOS directory by typing
the following at the command prompt:
cd windows
The command prompt should now look like
the following:
C:\WINDOWS>
2. Make
sure the file you are going to copy, NOTEPAD.EXE, is located in the WINDOWS
directory
by using the dir command followed by a
filename.
dir notepad.exe
A list similar to the following
appears:
3. To
copy the NOTEPAD.EXE file from the WINDOWS directory to the FRUIT directory,
type the
following at the command prompt:
copy c:\windows\notepad.exe c:\fruit
The following message appears:
1 file(s) copied
4. To confirm that you copied the files
successfully, view the contents of the FRUIT directory by
typing the following at the command
prompt:
dir \fruit
You
should see the file listed in the FRUIT directory.
Post a Comment
Write Your Precious Comments Here.!