I've found this in my D3 api book, but I may be overengineering here and there may be a newer way to do this.
procedure TForm1.Button1Click(Sender: TObject);
var
FileOpInfo: TSHFileOpStruct; // holds information about the file
begin
with FileOpInfo do
begin
Wnd := Form1.Handle;
wFunc := FO_COPY; // perform a copy
pFrom := PChar('c:\test\foldertocopy'+#0+#0); // the source
pTo := PChar(ToDirectory); // the destination directory
fFlags := FOF_WANTMAPPINGHANDLE;
end;
{perform the file operation}
SHFileOperation(FileOpInfo);
{the fFlags member contains FOF_WANTMAPPINGHANDLE, indicating
that a handle to an array of TSHNameMapping structures was
returned in the FileOpInfo.hNameMappings member. this must
be freed using the SHFreeNameMappings function.}
SHFreeNameMappings(GlobalHandle(FileOpInfo.hNameMappings));
end;
NOTE, in the original example pFrom was assigned a filename rather than a directory. Try it with a dir first, if unsuccessful, you may have to loop thru each file in the source directory, but that sounds cumbersome and sure it can't be right.
good luck
lou
p.s. HAve you tried searching the Borland.com website a general search on the net.