|I'm sure the code works, but I have 1 concern with this:|
When I'm replcaing (updating) the contents of a file, I only change the files that need changes. This has many advantages, one them is controlling your actions, since you can compare the result with your expectations. After a while, you won't see any changes being made. And if there are, something (or somebody) is still causing wrong syntax somewhere, so you can get rid of that.
How would that be done ? I know that DIFF and CMP are not easy on Windows batch, but that is not an excuse.