Modify txt file from NAV

chrisxx83chrisxx83 Member Posts: 54
Hi,
I got a problem with edit of txt file from code.
I need to change/delete line from file.
My code:
IF EXISTS('C:\BarCodes\result.txt') THEN BEGIN
  importFile.WRITEMODE(TRUE);
  importFile.TEXTMODE(TRUE);
  importFile.OPEN('C:\BarCodes\result.txt');
  WHILE importFile.READ(FileText) > 0 DO BEGIN
    IF FileText=NSText THEN FileText:=FileText+'111111'; 
  END;
  importFile.CLOSE;
END
ELSE
   MESSAGE('File does not exist');

Thanks in advance for help ;)
Sign In or Register to comment.