hello, maybe someone can help me. I have a lot of html files in Folder-1 and the same number of files in Folder-2. The name of the files is the same on both folders, only the content of them is different. As you can see in this image what I want to do is to copy the lines from <!–START–> to <!–FINNISH –> comments and paste them to other files from second folder, in html files, in the point PUT-HERE-THE-CODE
You have to know that the content of <!–START–> to <!–FINNISH –> is different on all pages, so only this 2 words are repeated in all files, the links are different. And in the Folder-2, the only part that repeats in all files is PUT-HERE-THE-CODE
You can use a regular expression to grab everything between <!–START–> and <!–FINNISH –> and just replace the text in the other file. Here’s an example for a single file. Put this into a loop for all your files and you’re good to go:
Thank you, yes, but your code will make a replacement only in 2 files, html-source.htm and html-dest.htm But I have 1300 files in Folder-1 and 1300 files in Folder-2. So I want to change all at once. How can I do that ?