Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Detect no data in a text file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01043067
Message ID:
01043075
Vues:
8
>We have a system where we upload text files into an AS400 as input. Unfortunately, since the two systems, FoxPro and AS400 are quite separate, we have to give input to the AS400 in this text mode.
>
>What I need to do is to detect that a text file has no data in it so that I can run a FoxPro program that will reverse an update flag field. The Question is How do you detect that a text file has no data in it? Use low-level commands?

What about: Empty(filetostr(lcTextFile)), providing that you already tested lcTextFile exists, and that the possibility of a non-zero sized file can be empty (all spaces for example). Otherwise, you can use adir an check the existance and the size of the file
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform