Are you looking for something like the following? As Bart says, it will fail horribly with binary files.
procedure ConvertAscToHexStr(const aFileName: string);
var
sl, conv: TStringList;
s: string;
function Converted: string;
var
p, len: integer;
begin
len:=Length(s);
Result:='';
if (len = 0) then Exit;
for p:=1 to len do
AppendStr(Result, IntToHex(Ord(s[p]),2));
end;
begin
sl:=TStringList.Create;
try
sl.LoadFromFile(aFileName);
conv:=TStringList.Create;
try
for s in sl do
conv.Append(Converted);
conv.SaveToFile(aFileName + '.converted');
finally
conv.Free;
end;
finally
sl.Free;
end;
end;