Hello Pros,
could you please help me once again?

My code work for me just fine for one file, my problem is to get this actions to every file in my Memo3.
To make this clear what my App does:
I got a HTML Template, and i would change seperate parts of the file with new ones, and save this as a new file.
1) Choose Template
2) Template get loaded into Memo1
3) Pressing the Button will search and list every HTML File from the dir you choose into Memo3
4) Load into Memo4 the current file listed at first in Memo3
5) Load HTML Code from prelisted locations of Memo4 and write it to Memo2
6) Write the HTML Code from Memo2 into Memo1 to the prelistet locations
7) Save File and repeat the Step 4) to Step 7) until every file from Memo3 was done
So thats my plan, unfortunately it does this actions just one time, and i can't figure out why

Could you please help me again?
here is the code:
Yes i know its a mess

procedure TForm1.Button2Click(Sender: TObject);
var
i: integer;
Ini: TIniFile;
Pfad: String;
Pfad2: Integer;
Save: String;
begin
If comboBox1.Text ='Vorlage wählen...' then
begin
showmessage('Bitte Vorlage wählen!');
end
else
If comboBox1.Text ='Normalglas' then
begin
if SelectDirectoryDialog1.Execute then
begin
GetFilesInDirectory(SelectDirectoryDialog1.FileName, '*.html', Memo3.Lines, True, True);
begin
for i:=0 to Memo3.Lines.Count-1 do
Ini:=TIniFile.Create(GetApplicationDirectory+'Vorlagen.ini');
try
Pfad := Ini.ReadString('Normalglas', 'Pfad', '');
Memo1.Lines.LoadFromFile(GetApplicationDirectory+Pfad);
finally
Ini.Free;
begin
Memo4.Lines.LoadFromFile(Memo3.Lines[i]);
Memo2.Lines.Add(String(Memo4.Lines[12]));
Memo2.Lines.Add(String(Memo4.Lines[14]));
Memo2.Lines.Add(String(Memo4.Lines[15]));
Memo2.Lines.Add(String(Memo4.Lines[38]));
Memo2.Lines.Add(String(Memo4.Lines[50]));
Memo2.Lines.Add(String(Memo4.Lines[55]));
with ProgressBar1 do
begin
Ini:=TIniFile.Create(GetApplicationDirectory+'Vorlagen.ini');
try
Pfad2 := Ini.ReadInteger('Normalglas', 'Platzhalter1', 10);
Memo1.Lines[Pfad2]:= Memo2.Lines[0];
ProgressBar1.Position := 15;
Pfad2 := Ini.ReadInteger('Normalglas', 'Platzhalter2', 12);
Memo1.Lines[Pfad2]:= Memo2.Lines[1];
ProgressBar1.Position := 30;
Pfad2 := Ini.ReadInteger('Normalglas', 'Platzhalter3', 13);
Memo1.Lines[Pfad2]:= Memo2.Lines[2];
ProgressBar1.Position := 45;
Pfad2 := Ini.ReadInteger('Normalglas', 'Platzhalter4', 36);
Memo1.Lines[Pfad2]:= Memo2.Lines[3];
ProgressBar1.Position := 60;
Pfad2 := Ini.ReadInteger('Normalglas', 'Platzhalter5', 48);
Memo1.Lines[Pfad2]:= Memo2.Lines[4];
ProgressBar1.Position := 75;
Pfad2 := Ini.ReadInteger('Normalglas', 'Platzhalter6', 53);
Memo1.Lines[Pfad2]:= Memo2.Lines[5];
ProgressBar1.Position := 90;
finally
Ini.Free;
Save:=(Memo3.Lines[0]+'glas.html');
Memo1.Lines.SaveToFile(Save);
ProgressBar1.Position := 100;
end;
end;
end;
end;
end;
end;
end;
end;