Hola,
He descubierto que no estaba leyendo de los archivos sino una línea.
Código Delphi
[-]
function ReadTextFiles(
path, mask: string): string;
function FileToStr(
path: string): string;
var
line: string;
aFile: TextFile;
begin
AssignFile(aFile, path);
Reset(aFile);
while not Eof(aFile) do
begin
ReadLn(aFile, line);
result := result + line;
end;
CloseFile(aFile);
end;
var
sr: TSearchRec;
begin
result := EmptyStr;
path := ExtractFilePath(path);
if FindFirst(path + mask,
faAnyFile, sr) = 0 then begin
try
repeat
result := result +
FileToStr(path + sr.Name);
until (FindNext(sr) <> 0);
finally
FindClose(sr);
end;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Memo1.Text := ReadTextFiles('.\', '*.csv');
end;