PDA

View Full Version : Re: Copy vs. Drag...


Protocol
10-30-2003, 05:03 AM
I've got a situation wherein I need to copy 127 files (that total 122 MB in size) from a CD-ROM to a portable media device.

Worm kicked in helping me with one aspect of it, but yet another keeps popping up and causing issues. Here's the sit:

When I use File/Copy in AMS to copy the files from the CD-ROM (or from another HD for testing purposes), it takes up to 20 minutes to copy these files.

Yet with the mouse (in windows explorer), I can select-all and copy (or move or drag) the files, and they move to the unit in under 4 minutes.

So what's the difference? I need to somehow copy this set of files from one location to the other in the 4 minute window rather than the 20 minute one.

I get the same results for both Win 98 se and Win 2000. Likewise sourcing from a CD-ROM and sourcing from the HD.

I'm willing to do anything to make this work, but I have to have this resolved asap. Any ideas? Thanks in advance!


Protocol

Brett
10-30-2003, 07:52 AM
The problem with the speed is the way that our file copy routine works. It operates on relatively small chuncks of the file at a time in order to provide progress feedback. Normally this is never noticed but with the size of your copy operation I can see why it may slow down a little.

Here are possible solutions:

1. Use a batch file to copy the files. You could have AMS write out the .bat file dynamically to say the temp folder and then run it. Having DOS copy the files should be fast. The downside is the ugly DOS window that appears during such an operation, but it will do the job.

2. Write or get someone to write (or find) a DLL that wraps the Shell API function SHFileOperation. This would essentially perform the same copy operation (right down to the progress dialog) as Windows Explorer does. This would be the most elegant solution but requires more development time (or money).

3. Put all of the files into a Zip file on the CD and use the unzip action to extract them. I don't know if this will be faster or not, but it is something to try.

Worm
10-30-2003, 09:07 AM
Brett,

The Folder Manipulation DLL I wrote wraps the SHFileOperation.

I posted an example of how to do the copy, but I don't know if that is the one Protocol is using or not.

Protocol
10-30-2003, 09:27 AM
Thanks for the great suggestions Brett...I'll definately try each of these and let you know the results.

I knew that if I could drag it, then it could be done automatically somehow. You da man.

And thanks again Worm...I'll PM ya in a while...


Protocol