Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FEOF()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: FEOF()
Divers
Thread ID:
00415038
Message ID:
00415148
Vues:
17
>Is there any way to show progress when scanning a file using low-level functions? I have this code:
>
>Do while not feof(lnHandle)
> .......
>Enddo
>
>It's a very large file so I want to update the _screen.caption or something as it's being scanned. Is there any way to do this?


You can use FSEEK() to find the end of file, and then track your progress throughout your operation:
nFH = FOPEN('C:\MyVeryLargeFile')
nPos = FSEEK(nFH,0,2) && Seek eof and return position
=FSEEK(nFH,0,0)  && return to start 
Yoy can inquire about your position in the file at any time:

nCurPos = FSEEK(nFH,0,1)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform