Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Replacing a string in a file! ! ! !

 
Anil Kurian
Greenhorn
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
Anil
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!