home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / pascal / 7586 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  2.1 KB

  1. Path: sparky!uunet!walter!att-out!oucsboss!oucsace!bobcat!csnyder
  2. From: csnyder@bobcat.ent.ohiou.edu (Chris Snyder  UNDER-ECE)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Copying Files directed by TP code
  5. Summary: copying filesies
  6. Keywords: DOS copy, copying files
  7. Message-ID: <1992Dec20.161657.20863@oucsace.cs.ohiou.edu>
  8. Date: 20 Dec 92 16:16:57 GMT
  9. Sender: usenet@oucsace.cs.ohiou.edu (Network News Poster)
  10. Distribution: comp.lang.pascal
  11. Organization: College of Engg. & Tech., Ohio University, Athens, Ohio
  12. Lines: 31
  13.  
  14. I have written some code that will sort the files in a directory that will
  15. 'best fit' onto a floppy disk. (ie. gif files) The code works fine in 
  16. generating a file that contains the different disk volumes, but I would like
  17. to have the program copy the files as well. The only way that I was able to 
  18. get the files copyied was to have it make a BAT file with copies the files
  19. using dos copy and the pause command. I don't like this, I want more control 
  20. over the copying.
  21.  
  22. I have tried using the EXEC command but I can't get it to work. Here is the 
  23. command lines I have tried.
  24.  
  25. EXEC('copy',name1+name2)   (* returns DOSERROR = 2 file not found  *)
  26.  
  27. EXEC('cpy.bat',name1+' '+name2)   (* locks up everything had to RESET  *)
  28.                                   (* cpy.bat is a batch with
  29.                      copy %1 %2                     *)
  30. I also tried using the {$M} compiler directive to adjust the heap to various
  31. sizes and then using the swapvectors procedure before and after the EXEC 
  32. command, but I got the same results as above.
  33.  
  34. Another posibility that I consdered was to copy the program with READ and 
  35. WRITE. This works but is ungodly slow. I tried using various buffer sizes
  36. and methods but the fastest speed that I could attain for copying a 60K file
  37. from the HD to a 3.5 disk was about 24 sec, compared to doing it in DOS with
  38. the copy command of 4 sec. That is not a good time ratio and will never do.
  39.  
  40. What I wonder is if anybody has any suggestions on how I could copy files
  41. directed by the code efficiently. Any help would be appricieted. Ethier post
  42. here or mail me at CSNYDER@Bobcat.Ent.OhioU.Edu.
  43.  
  44. Thanks in advance.       Chris....
  45.