[Files]
部分中列出的文件夹中相对应的复选框列表。如何在此文件夹中读取文件,然后仅复制用户选择的这些文件?现在,我什至不明白列表,因为文件夹不存在。
{tmp}\list
[Files]
Source: "list\*"; DestDir:"{tmp}"; Flags: recursesubdirs
[Code]
var
karten : TNewCheckListBox;
FileListBox : TNewListBox;
KartenFormular: TWizardPage;
procedure KartenEinlesen(const Directory: string; Files: TStrings);
var
FindRec: TFindRec;
begin
Files.Clear;
if FindFirst(ExpandConstant(Directory + '*'), FindRec) then
try
repeat
if FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY = 1 then
Files.Add(FindRec.Name);
until
not FindNext(FindRec);
finally
FindClose(FindRec);
end;
end;
procedure InitializeWizard;
var
AfterID: Integer;
begin
AfterID := wpSelectTasks;
KartenFormular :=
CreateCustomPage(
AfterID, 'Kartendaten', 'Ort für den Ordner Kartendaten auswählen');
FileListBox := TNewListBox.Create(WizardForm);
FileListBox.Parent := KartenFormular.Surface;
FileListBox.Align := alClient;
AfterID := KartenFormular.ID;
KartenEinlesen('{tmp}\maptiles\*',FileListBox.Items)
end;
在提取文件之前很早就发生。此外,将(所有)文件提取到