Dear all,
Making a program to copy a file to another file but only the specified range of bytes. IE: The first 4500k of a 10mb file etc... I've fiddled with some code, works fine, but rus extremely slow, im talking, 5 minutes to copy 1000k of data, anyone know of a more efficient way to copy a file using byte range, here's my code...
Anyone know why it takes so god damn long to do something simple? its using on average of %6 CPU usage the rest is idle, therefore it aint the CPU causing probs. please help!Code:Dim TempChar as Byte Dim ByteLength as Long Open "input.dat" for Binary Access Read as #1 Open "output.dat" for Binary Access Write as #2 ByteLength = 4539139 'End of file or byte length, just over 4.5mb of the file 'from start of file to end of marker/byte length... For x = 1 to ByteLength Get #1,, TempChar Put #2,, TempChar Next x Close #1 Close #2




Paul Rivoli
Reply With Quote