while SRI = 0 do
begin
if (SR.Name = '.') or (SR.Name = '..') then
begin
//不用做
end
else if SR.Attr = faDirectory then
begin
if CheckBox1.Checked then
begin
Start(APath + '\' + sr.Name, SR.Name, ndRoot);
end;
end
else
begin
Num := Num + 1;
Label2.Caption := IntToStr(Num);
ListBox1.Items.Add(SR.Name);
nd := TreeView1.Items.AddChild(ndRoot, SR.Name);
end;
SRI := FindNext(SR);
end;