Hi, i := 0; WHILE ch > "!" DO pat[i] := ch; INC(i); Texts.Read(R, ch) END; pat[i] := 0X; pat[i+1] := ch; (*directory option*) Just tested the above here on FPGA system, seems to work. -- Tomas Kral <thomas.kral at email.cz>