Author: <juergen@wondzinski.de>
Posted: 2018-10-29 17:50:07 Link
Even the "Code References" tool from FoxPro lets you do a global search and
replace over multiple files...
-----Ursprüngliche Nachricht-----
Von: ProFox <profox-bounces@leafe.com> Im Auftrag von
mbsoftwaresolutions@mbsoftwaresolutions.com
Gesendet: Montag, 29. Oktober 2018 22:18
An: ProFox <profox@leafe.com>
Betreff: [NF] Tool for editing multiple files for huge search/replace
operation
Literally about 10 years ago, I'm pretty sure this list suggested a tool
that I used to update several text files in a common folder; it was a big
"replace text 123 with 456" kind of thing. But alas, my memory is failing
me and I can't recall what the tool was called.
Anybody know of such a tool to handle large search/replace across several
text files in a same folder or even perhaps cascading tree of folders?
tia,
--Mike
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/00cd01d46fd9$bd5e5790$381b06b0$@wondzinski.de
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Author: Ken McGinnis
Posted: 2018-10-29 19:27:14 Link
Yes it does.
I use the "Code References" tool from FoxPro a lot. I stopped using the
global search and replace because it can destroy the files. There may be
a way to make it work, but I manually go through the list of files now
and it works well.
On 10/29/2018 2:50 PM, juergen@wondzinski.de wrote:
> Even the "Code References" tool from FoxPro lets you do a global search and
> replace over multiple files...
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: ProFox <profox-bounces@leafe.com> Im Auftrag von
> mbsoftwaresolutions@mbsoftwaresolutions.com
> Gesendet: Montag, 29. Oktober 2018 22:18
> An: ProFox <profox@leafe.com>
> Betreff: [NF] Tool for editing multiple files for huge search/replace
> operation
>
> Literally about 10 years ago, I'm pretty sure this list suggested a tool
> that I used to update several text files in a common folder; it was a big
> "replace text 123 with 456" kind of thing. But alas, my memory is failing
> me and I can't recall what the tool was called.
>
> Anybody know of such a tool to handle large search/replace across several
> text files in a same folder or even perhaps cascading tree of folders?
>
> tia,
> --Mike
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/5BD7A562.70007@gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Author: mbsoftwaresolutions@mbsoftwaresolutions.com
Posted: 2018-10-29 23:42:46 Link
On 2018-10-29 20:27, Ken McGinnis wrote:
> Yes it does.
>
> I use the "Code References" tool from FoxPro a lot. I stopped using
> the global search and replace because it can destroy the files. There
> may be a way to make it work, but I manually go through the list of
> files now and it works well.
I had the same experience as you years ago, Ken, with it screwing up
files. Never trusted the global replace after that.
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/065549dca211c9c31d6a617f7a42c3f4@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Author: <juergen@wondzinski.de>
Posted: 2018-10-30 03:14:32 Link
And, BTW, that's just a 3Liner in VFP:
FOR i = 1 TO ADIR(aFiles, "*.txt")
STRTOFILE(STRTRAN(FILETOSTR(aFiles(i,1)), "OldText", "NewText"),
aFiles(i,1))
ENDFOR
Or, maybe for easier disassembly:
FOR i = 1 TO ADIR(aFiles, "*.txt")
cFile = aFiles(i,1)
? cFile
cContent = FILETOSTR(cFile)
cContent = STRTRAN(cContent, "OldText", "NewText", <Several Options
here>)
STRTOFILE(cContent, cFile)
ENDFOR
wOOdy
"*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`.Visual FoxPro: It's magic !
(¸.·``··*
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/000c01d47028$96fb4780$c4f1d680$@wondzinski.de
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.