Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extracting data from a NotePad file
Message
From
09/02/2007 00:40:37
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
08/02/2007 07:00:26
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01193522
Message ID:
01193957
Views:
12
>Hi all,
>
>I need to access a notepad file, and then use VFP functions to sort out data from it. Could anyone tell me how to open Notepad through VFP and then how to pick out text for editing? Thanks.

What does the file look like? FOPEN etc can be way too much like work. For example:

If it look like this:

yourfile.txt
Steven      Rebello
Mike        Yearwood
There is quite simply NOTHING faster nor easier than to have a .DBF file with FirstName c(12) and lastname C(10) and

USE YOURDBF
APPEND FROM yourfile.TXT type SDF

You can then edit the contents with REPLACE commands and save the edited data back out with

COPY ALL TO newfile.txt TYPE SDF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform