Powinno dzialac. Jak cos to napisze drugie:)
procedure TForm1.Button1Click(Sender: TObject);
var
h1, h2, i: integer;
begin
h1 := StrToInt(utnijSeAjpi( Edit1.Text ));
h2 := StrToInt(utnijSeAjpi( Edit2.Text ));
for i := h1 to h2 do
begin
ListBox1.Items.Add(ChangeFileExt(utnijSeAjpi2(Edit1.text) + '.', IntToStr(i)));
end;
end;
function tform1.utnijSeAjpi(const FileName: string): string;
var
I: Integer;
begin
I := LastDelimiter('.' + '.', FileName);
Result := Copy(FileName, I + 1, MaxInt);
end;
function tform1.utnijSeAjpi2(const FileName: string): string;
var
I: Integer;
begin
I := LastDelimiter('.' + '', FileName);
Result := Copy(FileName, 1, I);
end;