Appending Binary Files Using the COPY Command (71161)



The information in this article applies to:

  • Microsoft MS-DOS operating system 3.1
  • Microsoft MS-DOS operating system 3.2
  • Microsoft MS-DOS operating system 3.21
  • Microsoft MS-DOS operating system 3.3
  • Microsoft MS-DOS operating system 3.3a
  • Microsoft MS-DOS operating system 4.0
  • Microsoft MS-DOS operating system 4.01
  • Microsoft MS-DOS operating system 5.0a
  • Microsoft MS-DOS operating system 6.0
  • Microsoft MS-DOS operating system 6.2
  • Microsoft MS-DOS operating system 6.21
  • Microsoft MS-DOS operating system 6.22

This article was previously published under Q71161

SUMMARY

MS-DOS allows you to append several binary files together using the COPY command. However, the target file that results is smaller than the sum of the source files.

MORE INFORMATION

To append binary files, use the COPY command with the /b switch. The syntax is as follows:

copy <source1> /b + <source2> /b [....] <targetfile>

-or-

copy /b <source1> + <source2> [....] <targetfile>

You can also combine several files into one by using wildcards. For example:

copy /b *.exe combin.exe

Note: The /b switch is also useful when combining or appending ASCII files that contain embedded control characters.

For more information, query on the following words:

COPY and strip and EOF
COPY and concatenate
COPY and XCOPY and merge


Modification Type:MajorLast Reviewed:5/12/2003
Keywords:KB71161