Topic: Notepad Search & Replace with Script

Hello all MVD,

I need help figuring out a script to open a text document (notepad) and searching for a particular string and then replacing with
a given string, then saving the new text document.  If you have any samples that can point to the right direction I'd appreciate
it.


Thanks!!

2 (edited by derek 2019-10-28 18:22:10)

Re: Notepad Search & Replace with Script

Hi There,
Is this the sort of thing you're after (see attached)?
Regards,
Derek.

Post's attachments

Attachment icon external file read write.zip 336.9 kb, 56 downloads since 2019-10-28 

Re: Notepad Search & Replace with Script

derek wrote:

Hi There,
Is this the sort of thing you're after (see attached)?
Regards,
Derek.

yes!!  Excellent Derek thank you.  I'm just goint to replace the part of the .txt file with an OpenDialog so that is
not specific to a particular archive.  Appreciate it.

Re: Notepad Search & Replace with Script

.

Post's attachments

Attachment icon test.7z 2.51 kb, 36 downloads since 2019-10-28 

Re: Notepad Search & Replace with Script

sibprogsistem wrote:

.

Well, gues sibprogsistem went ahead of me and did it better!  Thank you both!

Re: Notepad Search & Replace with Script

This works great with small .txt files but if you try to load a 60MB text file for example, the system hangs.  Is there a way to load the
archive in memory first then opening it for editing?  Just curious.

7 (edited by sibprogsistem 2019-10-28 19:23:05)

Re: Notepad Search & Replace with Script

gonpublic2k wrote:

This works great with small .txt files but if you try to load a 60MB text file for example, the system hangs.  Is there a way to load the
archive in memory first then opening it for editing?  Just curious.

программа все равно будет зависать, ведь с начало нужно будет заполнить память.