Forum Home
Press F1
 
Thread ID: 23845 2002-08-27 09:20:00 Copy command DOS switches, what do they mean John W (523) Press F1
Post ID Timestamp Content User
74189 2002-08-27 09:20:00 Can anyone please explain what the following DOS command switches mean on a Copy command

/s /e /h /y /k /i /f

Thanks in anticipation.....John.
John W (523)
74190 2002-08-27 09:27:00 COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
[+ source [/A | /B] [+ ...]] [destination [/A | /B]]

source Specifies the file or files to be copied.
/A Indicates an ASCII text file.
/B Indicates a binary file.
/D Allow the destination file to be created decrypted
destination Specifies the directory and/or filename for the new file(s).
/V Verifies that new files are written correctly.
/N Uses short filename, if available, when copying a file with a
non-8dot3 name.
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/-Y Causes prompting to confirm you want to overwrite an
existing destination file.
/Z Copies networked files in restartable mode.

The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line. Default is
to prompt on overwrites unless COPY command is being executed from
within a batch script.

To append files, specify a single file for destination, but multiple files
for source (using wildcards or file1+file2+file3 format).

-
-
-----------------------------------------------------------------------------------


XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
[/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
[/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z]
[/EXCLUDE:file1[+file2][+file3]...]

source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies only files with the archive attribute set,
doesn't change the attribute.
/M Copies only files with the archive attribute set,
turns off the archive attribute.
/D:m-d-y Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
/EXCLUDE:file1[+file2][+file3]...
Specifies a list of files containing strings. Each string
should be in a separate line in the files. When any of the
strings match any part of the absolute path of the file to be
copied, that file will be excluded from being copied. For
example, specifying a string like \obj\ or .obj will exclude
all files underneath the directory obj or all files with the
.obj extension respectively.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones.
Same as /S /E. May be used to modify /T.
/V Verifies each new file.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one file,
assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files that would be copied.
/G Allows the copying of encrypted files to destination that does
not support encryption.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files. Does not
include empty directories or subdirectories. /T /E includes
empty directories and subdirectories.
/U Copies only files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only attributes.
/N Copies using the generated short names.
/O Copies file ownership and ACL information.
/X Copies file audit settings (implies /O).
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/-Y Causes prompting to confirm you want to overwrite an
existing destination file.
/Z Copies networked files in restartable mode.

The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.
godfather (25)
74191 2002-08-27 09:30:00 Note that COPY and XCOPY are different commands, the switches you ask about rightly belong to XCOPY godfather (25)
74192 2002-08-27 09:32:00 I think maybe if you go
copy /?
you can read all about it,

or sent the screen contents to a text file
copy /? >> copy.txt

arrgh !! here we are...
Copies one or more files to another location.

COPY [/A | /B] source [/A | /B] [+ source [/A | /B] [+ ...]] [destination
[/A | /B]] [/V] [/Y | /-Y]

source Specifies the file or files to be copied.
/A Indicates an ASCII text file.
/B Indicates a binary file.
destination Specifies the directory and/or filename for the new file(s).
/V Verifies that new files are written correctly.
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/-Y Causes prompting to confirm you want to overwrite an
existing destination file.

The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line

To append files, specify a single file for destination, but multiple files
for source (using wildcards or file1+file2+file3 format).
E.ric (351)
74193 2002-08-27 14:41:00 Yup E.ric is correct that you can just type /? after the particular DOS command you want. You could also type Help and this will bring up a help menu where you can choose the command you want to get help about.

In saying that, DOS help will not work unless 4 DOS help files are present on your PC and from Win98 (or was it 95) onwards they arent installed by Windows setup. In Win98 the files are in the Tools/OldMSDOS directory on the CD.

The files are:-
Help.com
Help.hlp
Qbasic.exe
Qbasic.hlp

I place these in my Windows\Command folder as this folder is loaded as a path at startup so you don’t have to cange dir to the folder where help is located to view.

If you cant get hold of these files look at www.computerhope.com for descriptions of the various DOS commands

cheers
Parry
parry (27)
74194 2002-08-27 18:44:00 Oh Drats !!

Did you read, I might of given the right answer, but it did not answer the correct question, I was thinking about it just after I departed from the "F ONE" web site.
E.ric (351)
1