Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a way to tell a binary from a text file?
Message
De
17/01/2001 11:26:20
Donald Krasnick
Stanton Systems and Consulting
Havertown, Pennsylvanie, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00464420
Message ID:
00464703
Vues:
22
>Is there a way to read a file type? i.e if I expect to receive coma delimited files and get a spreadsheet instead, is there anyway to tell?
>
>Thanks

There really is no concept of a file type at that level - it's just a string of bytes. What you may want to do is use FREAD() to read in the first 'n' bytes and look through them one-by-one. If you find "binary" data (where ASC(x) < 32 or > 126, except for 13 and 10 (carriage return/linefeed)), you probably have a "binary" file.

Don
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform