DOS commands, Syntax Error
Hey Guys
I would like to know that how would i copy a directory from CD/ ROM to C drive. I tried doing it but was getting an syntax error message. Can any one tell me how do i copy a directory using a DOS command? Kindly suggest me the solution for the above issue.
Thank you.
Re: DOS commands, Syntax Error
The file newfile will have exactly the same contents as the file oldfile. As always, DOS assumes oldfile is on the default drive and also places newfile on the default drive. The syntax of DOS commands when two filenames are required is usually "from to", i.e. the first filename is the source (or "from") file and the second is the destination (or "to") file.
To copy a file from one disk to another, it is only necessary to precede the filename by a drive designation. If you are copying files between disks, then the copy can have the same filename as the original. In fact, if you do not supply a filename for the destination, DOS assumes that you want to use the same filename as the source. For example, if B is the default drive, the following command makes a copy of the file oldfile from the A disk on the B disk with the same name:
B>copy a:oldfile
Re: DOS commands, Syntax Error
Copies one or more files to another location.
SYNTAX
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.
To append files, specify a single file for destination, but multiple files for source (using wildcards or file1+file2+file3 format).
Re: DOS commands, Syntax Error
The COPY command can be used both to copy files from disk to disk or to create a second copy of a file on a single disk. (There are many more uses of the COPY command, but only the basic operation is discussed here.)
Example:
- C> copy c:kermit.exe a:
- Copies the file 'KERMIT.EXE' from the C drive to the A drive and gives it the same name.
- C> copy a:brazil1.dat b:\south\brazil2.dat
- Creates a copy of 'BRAZIL1.DAT' from drive A on drive B, putting it in the 'SOUTH' subdirectory and renaming it 'BRAZIL2.DAT'
The key to use this command correctly is to remember that the first file specified after the COPY command is the source file, the second is the target:ehp1 file. The source is the file to be copied. The target will be the location and name of the new file. If the file name and extension are omitted after the target's drive specification, the new file will have exactly the same name as the source file.