How to batch replace strings in a large number of files

⌚Time: 2026-02-10 02:33:00

👨‍💻Author: Jack Ge

I need to update the strings in hundreds of JSON files. I am converting some language codes to the standard format, for example, changing "en_US" to "en-US".

You can do this task using Notepad++.

Open Notepad++, click Search, then Find in Files.

In 'find what' and 'replace with', fill in the string to be replaced. 'Filters' allows you to specify that the operation only applies to certain types of files. In 'directory', enter the directory to search, and check 'in all sub-folders' to search subdirectories recursively.

Click 'replace in files' to replace content in all files. It's very convenient.