Results 1 to 4 of 4

Thread: DOS commands, Syntax Error

  1. #1
    Join Date
    Jan 2009
    Posts
    92

    ohmy 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.

  2. #2
    Join Date
    Jan 2008
    Posts
    3,388

    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

  3. #3
    Join Date
    May 2008
    Posts
    4,085

    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).

  4. #4
    Dr. V Guest

    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.

Similar Threads

  1. VMware Fusion gives Syntax Error
    By Ashoka in forum Windows Software
    Replies: 3
    Last Post: 03-02-2012, 09:22 AM
  2. JScript compilation error syntax error
    By B.Prajapati in forum Technology & Internet
    Replies: 4
    Last Post: 14-02-2011, 03:24 AM
  3. What is a syntax error?
    By Chrisch in forum Software Development
    Replies: 3
    Last Post: 24-11-2009, 09:53 AM
  4. Python syntax error
    By John Wilson in forum Software Development
    Replies: 2
    Last Post: 16-11-2009, 10:28 AM
  5. PHP WordPress Parse Error: syntax error, unexpected $end in
    By Bisujaksha in forum Software Development
    Replies: 2
    Last Post: 22-05-2009, 09:27 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,717,390,710.90021 seconds with 16 queries