Commodore PC Ms-Dos 3.2 User's Manual page 170

Table of Contents

Advertisement

98 MS-DOS User's Reference
U
The /w switch causes xcopy to wait before it starts copying files.
Xcopy displays the following message:
Press
any
key
when
ready
to
start
copying
files*—'
You must press a key to continue, or press control-c to abort the
;
xcopy command.
\~J
Xcopy exit codes
When correctly written programs exit back to ms-dos, they return
an exit code: 0 if no error occurred, or a value greater than zero
,
i
if there was a problem. This exit code, which you can test in
^—^
batch files, lets you "branch" to an error-handling routine in the
batch file.
If xcopy encounters an error, it returns one of the following exit
^-^
codes:
0
Copy without error
\^J
1
No files found to copy
2
control-c entered by user to terminate xcopy
4
Initialization error
^—^
There is not enough memory — invalid drive or command
line syntax, file not found, or path not found.
5
Int 24 error occurred
^-^
The user aborted from INT24 error reading or writing
You can test for these codes by using the errorlevel condition of
the batch processing if command.
t
i
Examples:
Copying to a disk
Because the diskcopy command copies disks track by track, it
t
j
with a different format
requires your source and target disks to have the same format.
^~~/^
If you have a disk that contains files in subdirectories and you
want to copy it to a target disk that has a different format, you
,
must use the xcopy command. For example, the following exam-
^—'
pie copies all the files and subdirectories (including any empty
subdirectories) on the disk in drive A to the disk in drive B:
xcopy
a:
b:
/s
/e
The xcopy command may prompt you to specify whether the
ii
target is a file or a directory. If you don't want to receive this
prompt, type the following command:
copy /b xcopy.exe mcopy.exe
U
U

Advertisement

Table of Contents
loading

Table of Contents