home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / PMBOOT.ZIP / KOPY.C < prev    next >
C/C++ Source or Header  |  1991-06-26  |  468b  |  18 lines

  1. #define INCL_NOCOMMON
  2. #define INCL_DOSFILEMGR
  3. #include <os2.h>
  4. #include <stdio.h>
  5.  
  6. int _cdecl main (int argc,char *argv[]) {
  7.    if (argc==3) {
  8.       USHORT rc = DosCopy(argv[1],argv[2],DCPY_EXISTING,0);
  9.  
  10.       if (rc) {
  11.          printf("DosCopy(\"%s\",\"%s\",DCPY_EXISTING,0): failed with error code %d\n",argv[1],argv[2],rc);
  12.       } /* endif */
  13.    } else {
  14.       printf("Usage: %s <source> <destination>\n",argv[0]);
  15.    } /* endif */
  16.    return 0;
  17. }
  18.