Insert code into HTML for thousands of files?

Started by Julius_2000, April 04, 2024, 05:40:34 AM

Previous topic - Next topic


Hi all!

So, we have a forum archive of an old, SMF unrelated forum where we only managed to salvage individual HTML files rather than a database. We use them as redirects in our current forum. Now that this old forum comes from a time before smartphones were widely available, I started to play around with the index file in order to make it more mobile friendly, which kind of worked.

So my question is: Does anyone of you know a convenient way to insert code into thousands of HTML files at once or in a bulk-like manner? My idea would be to analyze the required HTML elements/classes, write some css styles and inject them into each file. Doing it manually, though, would be a non-feasible way.

Any help would be greatly appreciated!


Notepad++, search and replace in files.

You cannot view this attachment.

Or programatically, python, php....


Ah! I didn't know it can do that. Thank you so much!