nigecooper
asked on
Copying files from Network drive to network drive using UNC paths
Whats the best way to copy files from a network drive using UNC paths?
I want to give the user feed back in the form of a progress bar or the 'flying file' windows animation?
I also want to make sure that the copied worked ie. Check for a result code.
Any help please.
I want to give the user feed back in the form of a progress bar or the 'flying file' windows animation?
I also want to make sure that the copied worked ie. Check for a result code.
Any help please.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Like above, use SOurce and Dest like in Windows Explorer.
To verify the copied files here, you can use TFileStream and compare values.
...
uses ShellAPI;
procedure ShellFileCopy(Source, Dest : String);
var Dados: TSHFileOpStruct;
begin
FillChar(Dados,SizeOf(Dado
with Dados do
begin
wFunc := FO_COPY;
pFrom := PChar(Source);
pTo := PChar(Dest);
fFlags:= FOF_ALLOWUNDO;
end;
SHFileOperation(Dados);
end;
The good point of this way are:
You can use wildchar.
Windows, with a floppy, detects diskfull and ask for another.
Windows shows a default system prograss bar, like explorer.