Jump to content
Sign in to follow this  
kkman360

How To Find A String In .txt File And Replace It ?

Recommended Posts

kkman360

hi! i want to search a string in .txt file and use this string to replace string of other .txt file.

how should i do?

thanks!

Share this post


Link to post
Share on other sites
SmOke_N

hi! i want to search a string in .txt file and use this string to replace string of other .txt file.

how should i do?

thanks!

Hmmm... well to use your post... you could always use the "search" function here... This replaces text and rewrites the file: http://www.autoitscript.com/forum/index.php?showtopic=23830

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
SmOke_N

_FileWriteToLine() by cdkid.... does exactly what you want

see this post

http://www.autoitscript.com/forum/index.ph...pic=21797&st=0#

8)

I don't think that does what he wants... it replaces a "specific" line of text, it doesn't search for string in the text itself and replace it. Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Valuater

I don't think that does what he wants... it replaces a "specific" line of text, it doesn't search for string in the text itself and replace it.

in the post i mentioned. cdkid wrote a function to utilize his file write to line with string replacement

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
SmOke_N

in the post i mentioned. cdkid wrote a function to utilize his file write to line with string replacement

8)

:) Derr... Me

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
kkman360

i will try it . thanks a lot!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×