| Parameter | Description | Value |
|---|---|---|
| source-filename | Specifies the source file name. |
The value is a string of 1 to 256 characters in the format of [ drive ] [ path ] [ file-name ]. |
| destination-filename | Specifies the destination file name. |
The value is a string of 1 to 256 characters in the format of [ drive ] [ path ] [ file-name ]. |
If the destination file name is the same as the name of an existing directory, the source file is copied to the specified directory. The name of the file that is newly generated in this directory is the same as the source file name. If the destination file name is the same as an existing file, the system prompts you whether to overwrite the existing file.
If you intend to copy a destination file, namely, a PAF, License, or configuration file, it is recommended that the directory and name of the destination file differ from the settings in the current startup file; otherwise, the system not only prompts you whether to overwrite the destination file, but also whether to overwrite the file in use.
# Copy the file named sample.txt from the hda1: to hda1:/.
<sysname> pwd
hda1:/
<sysname> dir
Directory of hda1:/
Idx Attr Size(Byte) Date Time FileName
0 -rw- 4 Sep 12 2000 21:46:45 snmpboots
1 -rw- 7094868 Aug 24 2000 00:54:53 vrp3.cc
2 -rw- 1122 May 13 2004 14:20:33 vrpcfg.cfg
500192 KB total (59576 KB free)
<sysname> copy hda1:/sample.txt hda1:/
Copy hda1:/sample.txt to hda1:/sample.txt ?[Y/N] :Y
Info:Copiedfile hda1:/sample.txt to hda1:/sample.txt...Done
<sysname> dir
Directory of hda1:/
Idx Attr Size(Byte) Date Time FileName
0 -rw- 4 Sep 12 2010 21:46:45 snmpboots
1 -rw- 7094868 Aug 24 2010 00:54:53 vrp3.cc
2 -rw- 1122 May 13 2011 14:20:33 vrpcfg.cfg
3 -rw- 10 May 13 2011 15:16:49 sample.txt
500192 KB total (59576 KB free)