I need to user to browse to folder while in installation, select it, and then have this folder copied from selected source to application folder.
ExistfilePage := CreateInputDirPage(OptionPage.ID,
'Select File Location', 'Where should personal data files be stored?',
'Personal data files will be stored in the following folder.'#13#10#13#10 +
'To continue, click Next. If you would like to select a different folder, click Browse.',False, 'New Folder');
ExistfilePage.Add('');
ExistfilePage.Values[0] := ExpandConstant('E:\Source_Inno');
Folderpath := ExistfilePage.Values[0];
end;
From "Folderpath" variable retrive the folder path
Now I want to copy the browsed file in to my application directory.
Please any one suggest an idea to accomplish this
What I have tried:
function GetFilename(const Value: string): string;
begin
Result := '';
if FileExists(ExistfilePage.Values[0]) then
Result := (ExistfilePage.Values[0]);
end;
and
[File]
Source: "{code:GetFilename}"; DestDir: "{app}"; Flags: external