Share this page 

Read big file (>32765 bytes)Tag(s): Powerscript


The FileRead function is limited to read only 32765 bytes in one shot. The solution is to read the file until there is no more data to be read.
blob lbl_data
blob lbl_temp
long ll_file

ll_file = fileopen("mybigfile.txt",streammode!)

DO WHILE FileRead(ll_file,lbl_temp) > 0
  lbl_data += lbl_temp
LOOP

FileClose(ll_file)