title: I need PowerShell script that can look for particular word in the txtfiles and add “00” at the beginning of the line
body: <p>Example:</p>
  
  <pre><code>bank of america                                  Page
  chase bank                                       count
  alli bank                                        Page
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>00 bank of america                                Page
     chase bank                                     count
  00 ally bank                                      Page
  </code></pre>
  
  <p>PowerShell script needs to look for word “page” and add “00” at the beginning of the line. </p>
  
  <p>My script is working and I can see the result in cmd output window but it's not updating .txt file inside the user folder. </p>
  
  <pre><code>powershell -command "foreach($ln in cat 'c:\users*.txt'){if($ln -match 'page'){write-host '00'$ln}}"
  </code></pre>
  
  <p>Please let me know what I need to add to the script to be able to update <code>c:\users*.txt</code> files. I have multiple txt files inside the users folder, so when I run the script they all need to get updated inside user folder but with my script, it's not happening. </p>