Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
StrToFile on large text file
Message
 
 
To
18/06/2008 12:02:02
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01325149
Message ID:
01325165
Views:
16
>I have a large (4 MB) text file that contains lines like those below. Is there a way, maybe using StrToFile(), that I can send the different blocks to separate files? I want to include the header between the dashed lines as well as the detail before the next header.
>
>
>---------------------------------------------------------------------------------------------------
>00000015 Copy this block into a file called Import.txt and put into appropriate Export directory
>---------------------------------------------------------------------------------------------------
>1,HIPAA,HIPAA,20080102,EXP_00D7280001.TIF
>1,Office Notes,Office Notes,20080102,EXP_00D7260001.TIF
>1,Prescriptions,Prescriptions,20080102,EXP_00D7160001.TIF
>---------------------------------------------------------------------------------------------------
>00000016 Copy this block into a file called Import.txt and put into appropriate Export directory
>---------------------------------------------------------------------------------------------------
>1,HIPAA,HIPAA,20080102,EXP_00D7280001.TIF
>1,Office Notes,Office Notes,20080102,EXP_00D7260001.TIF
>
String functions such as AT(), SUBSTR(), etc. would work, but may be slow. The best results you may achieve with Windows API functions here. I saw samples a while ago on Russian website, do you want me to look them up?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform