Hello,
do you mean something like this?
Delphi-Quellcode:
procedure TFrmMain.btnSaveToDirClick(Sender: TObject);
Var
i : Integer;
sDir : String;
begin
If OpenDialog.FileName = '' Then OpenDialog.FileName := EditHelpFile.Text;
sDir := ChangeFileExt(OpenDialog.FileName,'');
If Not DirectoryExists(sDir) then CreateDir(sDir);
For i := 0 To Tree.Items.Count - 1 do begin
Tree.Items[i].Selected := True;
TreeChange(Sender,Tree.Items[i]);
If Memo.Lines.Count > 0 then Memo.Lines.SaveToFile(sDir + '\' + Tree.Items[i].Text);
end;
end;