home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / ONLINE / OS2LYN_1 / OS2LYN_1.ZIP / lcp.c < prev    next >
C/C++ Source or Header  |  1997-07-12  |  600b  |  25 lines

  1. /* This is an extremely simple and silly substitute for cp(1) for
  2.    OS/2 systems without the GNU Fileutils installed.  It does not even
  3.    try to act like a complete 'cp'. */
  4.  
  5. #include <stdio.h>
  6. #include <os2.h>
  7. #define INCL_DOSFILEMGR
  8.  
  9. int main(int argc, char* argv[])
  10. {
  11.   APIRET rc;
  12.   if (argc != 3)
  13.     {
  14.       fprintf(stderr, "lcp is a stupid program that only copies one
  15. file to some file or directory, so only give
  16. it (exactly) two arguments, please.\n");
  17.       return 2;
  18.     }
  19.   else
  20.     {
  21.       rc = DosCopy(argv[1], argv[2], DCPY_EXISTING);
  22.       return rc;
  23.     }
  24. }
  25.