I'm trying to get inno setup with inno download plugin to copy all the downloaded files (a variety of formats) from temporary folder to my application folder. I have read this answer Inno Setup - FileCopy use wildcard character in pathname and created this script below:
procedure CurStepChanged(CurStep: TSetupStep);
var
FilesFound: Integer;
FindRec: TFindRec;
begin
FilesFound := 0;
if FindFirst(ExpandConstant('{tmp}\*'), FindRec) then begin
try
repeat
// Don't count directories
if FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY = 0 then
FileCopy(ExpandConstant('{tmp}\*'), ExpandConstant('{app}'), false)
until not FindNext(FindRec);
finally
FindClose(FindRec);
end;
end;
end;
The files are being found in the temp folder but aren't being copied over. What am I missing?