How to change html code in multiple files at one time

Asked By 40 points N/A Posted on -
qa-featured

Does anyone know if there's an option in Sublime Text 2 (or some other editing program) where I can change content in multiple files at one time? Let's say I want to change my phone number in the footer on every page, I have to open all files, and copy past it on every single page by myself. I know WordPress or a local server is a solution, but can it be done without that?

SHARE
Answered By 0 points N/A #187704

How to change html code in multiple files at one time

qa-featured

Notepad++ has the ability to do this. You can download it from: https://notepad-plus-plus.org/download/v6.6.8.html.



To edit, you must perform the following:



1. Open the files you want to replace

2. Click on the Search Menu and click Replace

3. Enter the text that you want to find and then the text to replace.

4. Click Replace, it will replace all open files with the defined text

Answered By 590495 points N/A #315550

How to change html code in multiple files at one time

qa-featured

Yes, it is possible but all files that need to be modified must be opened. You can do this with a text editor application that supports tab editing like Notepad++. To try it, download the latest Notepad++ and install it. The latest version at the moment is Notepad++ 7.6.3. Once installed, start Notepad++ then open all the files you need to modify.

Notepad++ find and replace in all files
Notepad++ find and replace in all files

Notepad++ will open the files in multiple tabs. Once all files are opened, in Notepad++, click “Search” then select “Replace” or press CTRL + H. In “Replace” dialog, under “Replace” tab, enter the search string in “Find what” field. In “Replace with” field, enter the new text or string. Finally, click “Replace All in All Opened Documents” to replace the word or words in all files you opened.

When you are finished, click “Close”.

Related Questions