How to replace a string in a text file (113278)
The information in this article applies to:
- Microsoft FoxPro for MS-DOS 2.0
- Microsoft FoxPro for MS-DOS 2.5
- Microsoft FoxPro for MS-DOS 2.5a
- Microsoft FoxPro for MS-DOS 2.5b
- Microsoft FoxPro for MS-DOS 2.6
- Microsoft FoxPro for Windows 2.5
- Microsoft FoxPro for Windows 2.5a
- Microsoft FoxPro for Windows 2.5b
- Microsoft FoxPro for Windows 2.6
- Microsoft FoxPro for Macintosh 2.5b
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 6.0
- Microsoft Visual FoxPro for Windows 7.0
- Microsoft Visual FoxPro 8.0
- Microsoft Visual FoxPro 9.0 Professional Edition
This article was previously published under Q113278
2.00 2.50 2.50a 2.50b 2.60 | 2.50 2.50a 2.50b 2.60 3.00 | 2.50b
MS-DOS | WINDOWS | MACINTOSH
kbprg
SUMMARY
FoxPro does not contain a function for replacing a character string in an
ASCII text file. One way to do this is to use low-level file functions. A
simpler way is to copy the text file to a memo field, make the change using
STRTRAN(), and copy the memo field back to an ASCII file, as demonstrated
below.
Modification Type: | Major | Last Reviewed: | 5/10/2005 |
---|
Keywords: | KB113278 |
---|
|