Hi
I would like to replace all occurences of one string with another throughout all the files in a folder. There are about 14000 files in this folder averaging about 2kb each. The obvious way I can think of doing this is looping through the directory listing, opening each file, reading each line and replacing contents then writing back.
I can't believe this would be the most efficient way of doing this. Has anyone else got any other ideas?
Not sure if it would have been any quicker but I notice the function file_put_contents() is available in version 5 CVS. I am running version 4.3.2.
Thanks for any help.
Chris
I would like to replace all occurences of one string with another throughout all the files in a folder. There are about 14000 files in this folder averaging about 2kb each. The obvious way I can think of doing this is looping through the directory listing, opening each file, reading each line and replacing contents then writing back.
I can't believe this would be the most efficient way of doing this. Has anyone else got any other ideas?
Not sure if it would have been any quicker but I notice the function file_put_contents() is available in version 5 CVS. I am running version 4.3.2.
Thanks for any help.
Chris