0

I want to insert some HTML code (8 lines) between code that already exist in 60 .html files. Some of the HTML files are in separate folders in the directory. I found this posting, but it only answers half of my issue.

modify multiple html files with Powershell

<li><a href="/sites/abc/stores.aspx">Directed Stores</a></li>

**I want new code inserted here for 70 files in a directory by using PowerShell**

<li><a href="/sites/abc/stores.aspx">Non-directed Stores</a></li>
3
  • Please edit your question to include what code you've tried and which half of your question the linked question's answers successfully answered, so that answerers don't have to re-answer that half. Commented Apr 5, 2022 at 16:41
  • It's a bit unclear what step you're looking for help with. Do you know how to edit one file? Do you know how to run a command on multiple files? Commented Apr 5, 2022 at 16:42
  • There are countless ways to "insert into the middle of a file". I'm not clear if you're asking for help with that part of the question, and I would need more information about the structure of these files to give useful/concrete advice about how I would opt to approach that problem. (For example, maybe you could just insert onto a specific line number?!) Commented Apr 5, 2022 at 16:45

0

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.