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