I used Delphi 7 with Api function SHFileOperation.
This is my function :
function CopyDir(const fromDir, toDir: string): Boolean;
var
fos: TSHFileOpStruct;
begin
ZeroMemory(@fos, SizeOf(fos));
with fos do
begin
wFunc := FO_COPY;
fFlags := FOF_FILESONLY;
pFrom := PChar(fromDir + #0);
pTo := PChar(toDir)
end;
Result := (0 = ShFileOperation(fos));
end;
My directory structure contains 3347 directories with 21 376 files. The
size of the root directory is 3.6 GB.
If I run CopyDir('\docs\intranet\drf\rapgestion\aa', 'c:\temp')
everything is OK. But if I run this code (with the root directory)
CopyDir('\docs\intranet\drf\rapgestion\', 'c:\temp') it gaves me a
errorcode 6. What is the differences between those two lines of code
except the size of my directory structure (Dir AA contains 99 files, 36
directories, size 12.3 MB) ?
I hope someone can help me.
Thanks