[delphizip] FSpecArgs.Add

  • From: Alistair George <bigal@xxxxxxxxxx>
  • To: delphizip@xxxxxxxxxxxxx
  • Date: Fri, 29 Nov 2002 15:06:50 +1300

Hello,
For what it is worth, here is an example of how to use *.* as the Add option in
a stringlist, parsed for, and including only items in FSpecArgs.Add.

var
  xval: integer;
  IsOne: string;
  slTemp: TStringList;

  slTemp := TStringList.Create;
  richedit1.lines.beginupdate;

  for tval := Pred(richedit1.Lines.Count) downto 0 do
  begin
    with richedit1.Lines do
    begin
      isone := strings[tval];

      if (directoryexists(isone)) then //its DEFINITELY a directory
      begin
        IsOne := IsOne + '\*.*';   //include all files in the directory
        if SortGrid1.Cols[0].Count > 1 then  //Stringgrid with 
items:FSpecArgs.Add
        begin
          xval := 1;
          while (SortGrid1.Cells[0, xval] <> '') do
          begin
            isone := SortGrid1.Cells[0, xval];
            slTemp.Add('*.' + isone);
            inc(xval);
          end;
        end
        else slTemp.Add(IsOne);
      end;
    end;
  end;

Regards,
Alistair+


Other related posts: