Contributor: SWAG SUPPORT TEAM
{I've been trying to figure out how to do a fairly fast copy
in pascal. It doesn't have to be faster then Dos copy, but
I definatly DON'T want to shell out to Dos to do it!
I've got the following working... in the IDE of Turbo 6.0!
If I compile it, it wont work at all. ALSO... If you COMP
the Files to check For errors, They are there. (UGH!)
(ie, it isn't a perfect copy!)
The thing is I want to get as much as I can in each pass!
(But turbo has limits!)
Heres my code... Just rough, so no Real comments.
}
Program Copy (InFile, OutFile);
Uses Dos;
Var
I, Count, BytesGot : Integer;
BP : Pointer;
InFile,OutFile:File;
FI,FO : Word;
Path,
FileName : String[80];
DirInfo : SearchRec;
BaseRec, RecSize : longInt;
begin
FileName := ParamStr(1); {Set the SOURCE as the first ParamSTR}
Path := ParamStr(2); {Set the Dest. as the 2nd paramSTR}
If paramCount = 0 Then
begin
Writeln('FastCopy (C) 1993 - Steven Shimatzki');
Writeln('Version : 3.0 Usage: FastCopy