Procedure TForm1.Button1Click(Sender: TObject);
var
FromF,ToF : file of byte;
Buffer : array[0..4096] of char;
NumRead : integer;
FileLength : longint;
begin
Source:='c:\demo.txt';
Destination:='d:\demo.txt'
AssignFile(FromF,Source);
reset(FromF);
AssignFile(ToF,Destination);
rewrite(ToF);
FileLength:=FileSize(FromF);    //源文件的大小
With Progressbar1 do
begin
  
  Min := 0;
  Max := FileLength;
  while FileLength > 0 do
     begin
       BlockRead(FromF,Buffer[0],SizeOf(Buffer),NumRead);  
       FileLength := FileLength - NumRead;
       BlockWrite(ToF,Buffer[0],NumRead);  
       Position := Position + NumRead;  
     end;
    CloseFile(FromF); 
    CloseFile(ToF);
end;
end;
该程序是成功的,现在我把源文件Source:='c:\demo.txt';换成网络某台机上的文件
Source:='\\fornet-177\update\demo.txt';便报错如下
Project Project1.exe raised exception class EInOutError with message
'File access denied'.Process stopped.Use Step or Run to continue.
怎么不能拷贝网络上的文件么?