home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / info / faq / os2_20 / os2help / doscopy.fax < prev    next >
Encoding:
Text File  |  1992-09-17  |  3.3 KB  |  76 lines

  1. PROBLEM WITH DOSCOPY()
  2. ----------------------
  3.  
  4. I believe that the DosCopy() subroutine has a defect that
  5. prevents reliable date and time stamp setting of the target file
  6. when copying from a remote DOS LAN server to a local OS/2 2.0
  7. filesystem.
  8.  
  9. I was recently informed of a situation in which a file copy
  10. utility that I wrote (ccp - conditional copy) was incorrectly
  11. setting the date and time of target files.  The ccp program
  12. uses the DosCopy() subroutine to perform any actual file copy
  13. operations.
  14. .
  15. For example, the bldtt.asm file had a source date and time of
  16. 6/28/91 and 12:55p.  After the copy, its target date and time
  17. was 6/22/96 and 5:07p.  In fact, about 400 files out of a
  18. total of 2000 files had incorrect date and time stamps after
  19. the copy.  (The incorrect target date and time stamps are
  20. neither those of the source file nor those of the current time
  21. and date.)  The results appear repeatable:  the same files get
  22. the same bad timestamps each time.
  23. .
  24. The environment is as follows:
  25.  
  26.      1) The ccp (conditonal copy) program, a 16-bit OS/2
  27.         application, is running on an OS/2 2.0 system.  It
  28.         uses the DosCopy() subroutine to perform the copy
  29.         operation on each file that needs to be copied.
  30.  
  31.      2) The source files exist on a DOS machine running LAN
  32.         Server.  The local OS/2 2.0 machine accesses the DOS
  33.         machine's files via a remote drive that is set up by
  34.         the NET USE command.
  35.  
  36.      3) About 2000 files were copied.  Of these, about 400
  37.         files had date and time stamps on the OS/2 2.0 system
  38.         that did not match the date and time stamp of the
  39.         source file on the DOS system.  (No data was lost or
  40.         corrupted, though).
  41.  
  42.      4) The results are repeatable:  Files that copy ok
  43.         always copy ok.  Files that get an incorrect target
  44.         date and time always get the same incorrect date and
  45.         time.
  46.  
  47. The standard COPY command & DOS-only version of ccp did not fail
  48.  
  49.      1) The built-in OS/2 COPY command correctly set the
  50.         date and time stamps of the target files.
  51.  
  52.      2) The DOS-only version of ccp also set the date and
  53.         time stamps of the target files correctly.
  54. .
  55. Notes about the ccp program:
  56.  
  57.     (a) The OS/2-only version was developed on OS/2 1.3 using C2
  58.         1.1 and the OS/2 1.3 toolkit.  Once it determines the
  59.         exact source and target names of a file to copy,it calls
  60.         the DosOpen subroutine to perform the actual copy.
  61.  
  62.    (b) The DOS-only version was developed using the C/2 1.1 on a
  63.        DOS machine.  It uses the open, close, read, and write
  64.        subroutines to copy the file's data (it ignores EAs).  It
  65.        also uses the _dos_setftime and _dos_setfileattr
  66.        subroutines to set a target file's date, time, and
  67.        attributes to those of the source file.
  68.  
  69. -------------------------------------------------------------------------------
  70. Thank you for calling the OS/2 2.0 Support Line.  Regarding the problem
  71. reported to the Support Line, we feel that this information may assist
  72. you in resoloving your problem.  If you still require assistance, please
  73. call 1-800-237-5511, and reference your customer number and problem (PMR)
  74. number.  Your Problem Record Number (PMR) should appear on the cover
  75. page of this faxed document.
  76.