Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2008 Jun : Is there a way to get the filename of the file being processed with SHFileOperat
| Subject: | Is there a way to get the filename of the file being processed with SHFileOperat |
| Posted by: | "Bill Miller" (w2m..@hicomponents00.com) |
| Date: | Fri, 6 Jun 2008 13:30:11 |
Is there a way to get the filename of the file being processed with
SHFileOperation when using a wild card TShFileOpStruct (*.*)?
if HasAttr( backupFile.ShellObject.SourcePath, faDirectory ) then
begin
fromF := IncludeTrailingPathDelimiter(
backupFile.ShellObject.SourcePath ) + '*.*'#0; / / wild card
toF := IncludeTrailingPathDelimiter( Destination ) + #0;
end;
FillChar( fileOp, Sizeof( TShFileOpStruct ), 0 );
with fileOp do
begin
wnd := Handle;
wfunc := FO_COPY;
pFrom := PChar( fromF );
pTo := PChar( toF );
fFlags := FOF_NOCONFIRMATION or FOF_NOCONFIRMMKDIR or FOF_SILENT;
fAnyOperationsAborted := False;
hNameMappings := nil;
lpszProgressTitle := nil;
end;
Result := SHFileOperation( fileOp );
I need to show the filename being copied in a TLabel.
Regards,
Bill