0

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?

Community
  • 1
  • 1
callum
  • 45
  • 4
  • Hi Martin, Thanks for this link, I had not seen it in my searching. I've implemented the code and it works. So thank you very much for your help. – callum Apr 11 '16 at 13:20
  • I have a quick question, if a user already has my program installed using inno setup and inno download plugin, then I release an update, how would I go about getting inno download plugin to only download and install the updated files rather than downloading all the files from my server? – callum Apr 11 '16 at 14:00

0 Answers0