Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remove chr(10)'s from a file??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01479909
Message ID:
01479913
Vues:
48
>>>>I have a file that has both line feeds and carriage returns in it...and the file seems like it might be too large for the filetostr command to work right.
>>>>
>>>>Is there an easy way for me to strip all of the Chr(10)'s out of a file?
>>>>
>>>>Thanks!
>>>
>>>Probably reading in chunks with lower-level file functions. May be better with C functions than in VFP.
>>
>>Now I'm thinking that the filetostr might work - the file is never more than a meg or two.
>
>If so, then filetostr will work.

Well that was easy enough...

lcStartingStringFile = FILETOSTR('MyFile.txt')
lcResultStringFile = STRTRAN(lcStartingStringFile,CHR(10),'',1)
STRTOFILE(lcResultStringFile,'MyFile.txt')
ICQ 10556 (ya), 254117
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform