Top 50 DOS Problems Solved: Why doesn’t COPY copy?

Q: I want to copy all the files from a 5.25-inch floppy disk on to a 3.5-inch floppy disk, including the ones in some sub-directories. The COPY command won’t copy the contents of sub-directories, but when I try to use DISKCOPY I get the error message “incompatible format for drive’. What’s going wrong?

A: There are three commands to copy files from one disk to another: COPY, XCOPY and DISKCOPY. They work in different ways, and for any copy operation you need to choose the tool that’s most appropriate for what you want to do.

The problem with COPY is that it only works on the directory you specify and it cannot create new directories on the new disk. XCOPY works in a similar way to COPY but is more intelligent. You can tell it to look inside sub-directories, and it will automatically create those sub-directories on the new disk.

The command you need to type in, assuming you are copying from drive A to drive B, is:

XCOPY A:*.* B: /S

Is is the /S switch that tells XCOPY to work on subdirectories too.

Who remembers using a copy command which didn’t work with subdirectories?

7 thoughts on “Top 50 DOS Problems Solved: Why doesn’t COPY copy?

  1. Well of course we all use ROBOCOPY these days, right?

    Anyway, I would use COPY over XCOPY if I didn’t need any of the XCOPY options, because COPY is built into the command interpreter and XCOPY is a separate executable (or in the case of Windows 9x, two executables).

  2. > Who remembers using a copy command which didn’t work with subdirectories?

    By default?

    $ mkdir foo
    $ cp foo bar
    cp: omitting directory ‘foo’
    $ rpm -qf /usr/bin/cp
    coreutils-8.22-19.fc21.x86_64

  3. I remember using COPY before discovering XCOPY and having to swap disks (Amstrad 1640 SD for those that remember) for Every. Single. File. That took a long time for both disks for Microprose F19

  4. Surely you want XCOPY /S /E…

    The difference between COPY and XCOPY is that COPY was a command builtin to the shell (COMMAND.COM) and XCOPY was an external utility that lived wherever you put the standard DOS utilities (often C:\DOS).

    (back to lurking now)

  5. I remember operating systems that didn’t HAVE any stinkin’ subdirectories to copy from.

Leave a Reply

Your email address will not be published. Required fields are marked *