Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Replacing a string in a file! ! ! !

Anil Kurian
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to replace a string with an another string in an existing file.
I could only find read and write methods. That means I would need to create a temp file with the changed records, delete the first file and rename the temp file to original file.
Is there any way to just change an existing record?
Is there a better and more efficient way to achieve this task?
Is there a way to gobally change a string with another string and save the file?
Any help/suggestion will be appreciated
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic