lnLines = alines(arrContent,FileToStr('importme.txt')) lnLinesPerRecord = 4+1 && 1 blank lnRows = ceiling(lnLines/lnLinesPerRecord) dimension arrContent[lnRows,lnLinesPerRecord] For ix=1 to lnLinesPerRecord If Type('arrContent[lnRows,ix]')='L' arrContent[lnRows,ix] = '' endif endfor Select myTable Append From array arrContentAnother way might be do some xml processing. ie:
lnHandle = Fopen('importme.txt') Set Textmerge To importme.XML Noshow Set Textmerge On \\<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?> \<VFPData> Do While !Feof(lnHandle) \<myTable company="<<Fgets(lnHandle,4096)>>" address="<<Fgets(lnHandle,4096)>>" \\ CityState="<<Fgets(lnHandle,4096)>>" lcPhoneFax = Fgets(lnHandle,4096) \\ Phone="<<StrExtract(lcPhoneFax,'Phone:','Fax:')>>" \\ Fax="<<Substr(lcPhoneFax,Atc('Fax:',lcPhoneFax)+Len('Fax:'))>>"> If !Feof(lnHandle) Fgets(lnHandle) Endif Enddo \</VFPData> Set Textmerge To Set Textmerge Off Fclose(lnHandle)You could rectify code and (add a table schema) then XmlToCursor().