Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extracting portions of code from a text file
Message
From
23/11/2004 17:21:39
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
23/11/2004 16:22:09
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows 2000 SP2
Network:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00964037
Message ID:
00964060
Views:
8
>How can I search for a phrase in a text file (.PRG), seach for a second phrase and copy/paste all the text inbetween to another text file. Basically, I want to programmatically take portions of code and copy them to the bottom of another file.

I think you might use a combination of:

  • FileToStr()
  • at()
  • substr()
  • StrToFile(), with the third parameter to append data
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Previous
    Reply
    Map
    View

    Click here to load this message in the networking platform