Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Obnoxiously large text file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01290411
Message ID:
01290582
Vues:
11
Hi, Larry!
What about using File Scripting object?
Clear
lcFile2Read="name_and_path_your_large_file"
lnFileMode=1 && only for read
llForceCreateNew=.F.
lnFormat=0 && ASCII &&
lcResultString=""
lnHowManyCharactersPerRead = 1

loFSO = CREATEOBJECT('Scripting.FileSystemObject')
If loFSO.FileExists(lcFile2Read)
   loTextStream=loFSO.OpenTextFile(lcFile2Read,lnFileMode,llForceCreateNew,lnFormat)
*!*   loFile=loFSO.OpenTextFile(lcFile2Read,lnFileMode,llForceCreateNew) && valid command
   DO WHILE !loTextStream.AtEndOfStream
      * you can read on the byte by byte basis
      * lcResultString=lcResultString+loTextStream.Read(lnHowManyCharactersPerRead)
      * here may be your code for text psrsing
      
      
      * or you can read on the text line basis
      lcResultString=loTextStream.ReadLine
      ? lcResultString
   ENDDO
   loTextStream.Close
Endif

Release loFSO
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform