Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove chr(10)'s from a file??
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01479909
Message ID:
01479913
Views:
47
>>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform