title: removing "(1)" from multiple file names that span multiple directories
body: <p>So I was redownloading my google drive backup and I noticed that in every file no matter how deep in my directory and or subdirectory it had in its name a &quot;(1)&quot; and I was wondering about removing this.
  Iv gotten to <code>get-childitem . | foreach { rename-item $_ $_.Name.Replace(&quot; (1)&quot;, &quot;&quot;) }</code> but thats only for this directory and I need to go deeper a lot deeper.
  Thanks in advance.</p>
  <p>update: got to &quot;get-childitem -recurse | rename-item -newname { $_.name -replace &quot; (1)&quot;, &quot;&quot;}&quot;
  however it throws an error:
  rename-item : Source and destination path must be different.
  At line:1 char:26</p>
  <ul>
  <li>... lditem -recurse | rename-item -newname { $_.name -replace &quot; (1)&quot;, &quot;&quot;}</li>
  <li>
  <pre><code>                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  </code></pre>
  <ul>
  <li>CategoryInfo          : WriteError: (C:\Users\Opti\D...rgs (1)\lib (1):String) [Rename-Item], IOException</li>
  <li>FullyQualifiedErrorId : RenameItemIOError,Microsoft.PowerShell.Commands.RenameItemCommand</li>
  </ul>
  </li>
  </ul>
  <p>edit: Get-ChildItem -Path &quot;C:\My\Root\Path&quot; -Filter &quot;<em>(1)</em>&quot; -Recurse | Foreach {Rename-Item -Path $<em>.FullName -NewName $</em>.Name.Replace('(1)','')}
  ^ this is what worked for me</p>