File manipulation in JS

I need help with file manipulation.
I have a file, let’s say one.html with contents


I now want to have files from two.html to ten.html with the content inside the div as two for two .html, three for three.html and so on…
Is this even possible in js…???
If yes, how…??? :thinking: :thinking: :thinking: :thinking: :thinking:

It is not possible with JavaScript. Even if there was a way, it would be pretty impractical. You could do it with NodeJs, but then you are just reinventing a portion of what template engine does. Why would you need this behavior?

Why do you want to do this, for what purpose? The are various ways to do similar things, but it’s not very clear what it is you actually want or why you want it done. Just literally moving the contents on your file system? Rendered out on a webpage? Etc.

Thanks @gunhoo93 and @DanCouper for the comments.
I went with using a batch script for the process, it’s done now.