Many of my sites consists of hundreds of HTML files, and I often have to make changes via "Find and replace" in all files simultaneously. I use a combination of FTP, cPanel's file manager, Notepad++ and Microsoft Expression Web for this purpose and would like to know if there is a more efficient way to do this.
I use Notepad++ for most simple "find and replace" searches and for regular expression searches. However, Notepad++ does not allow you to paste multiple lines of text, so I am forced to use Expression Web to replace larger blocks of code, especially if it has lots of white spaces and line breaks. Expression Web is not the fastest thing in the world, unfortunately, and a combination of that and having to switch between programs slows down my workflow quite a bit.
I know that people use grep via putty, but again, that would only work with simple replacements, not large, multiline blocks that you just need to copy and paste. I would like to know two things:
1) What's a good replacement for Expression Web to do "find and replace" of large blocks of text or code in Windows?
2) Is there a way to run this process with files still being on the server? If not, is it possible to at least reduce the number of steps? Right now it's taking way too many steps:
- Creating a backup of the site in cPanel
- Downloading and extracting the backup
- Editing the files
- Zipping the edited files into a single archive
- Uploading the archive via FTP
- Going back to cPanel to delete old files and to extract the new archive.