0

I need to modify over a thousand html files in a certain directory. I need to remove all the content and replace it with the html below. What would be the best way of doing this?

<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Please use the Supplemental Information Browser to view approvad Servie  Bulletins
</body>
</html>

1 Answer 1

1

If all you need to do is overwrite the contents of the files, just copy that HTML into a file in a different directory (for example, into ..\template.html), and then execute

for %d in (*.html) do copy /Y ..\template.html %d

in the directory in which all of the files you need to overwrite are.

You don't even need Powershell to simply overwrite a group of files with exactly the same content.

Sign up to request clarification or add additional context in comments.

1 Comment

yes it has already been corrected. fat finger and didn't spell check before I put it up

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.