Page 2 of 2

Re: Problem with CreateFile_()

Posted: Mon Feb 29, 2016 9:07 pm
by infratec
Or in PB

Code: Select all

Procedure.s GETFILETXT(Filename$)
  
  Protected File.i, Result$
  
  File =  ReadFile(#PB_Any, Filename$)
  If File
    Result$ = ReadString(File, #PB_Ascii | #PB_File_IgnoreEOL)
    CloseFile(File)
  EndIf
  
  ProcedureReturn Result$
  
EndProcedure

Debug GETFILETXT("C:\OutOfTheBox\888.txt")
Bernd