Convert a UNIX linefeed delimited text file to a DOS CR/LF delimited file (Views: 29)
Problem/Question/Abstract: I'm having an issue converting a Unix 1.15 GB text file to a Windows file. It always seems my application runs out of memory during the conversion. Does anyone have any ideas as to how to accomplish this? Answer: It sounds like you're trying to read the whole file into memory or something. How does this work: program unix2dos; {$APPTYPE CONSOLE} uses SysUtils; var fp1: file; fp2: TextFile; buffer, buf2: array[1..8192] of Char; numread: Integer; i: Integer; begin if paramcount <> 2 then begin writeln('USAGE : UNIX2DOS |