I am trying to make a webpage that allows the user to enter in the filepath of a .txt file and then search for and replace strings in the .txt file. I have done a bit of searching and only found pages saying it can't be done because of security reasons and im pretty sure this is rubbish.
How do i do it?
It's not rubbish. There is
FileReader, but it's only supported by some browsers, and it only gives you read only access. Chrome evidently supports a
FileWriter, but you can only write to a sandboxed environment.
You need to upload the file to a server, do the modifications, then send the modified file back -- note this won't get rid of the original.