windows:start

Windows

One-liner

Get-ChildItem -Filter "D10 *" | Rename-Item -NewName { $_.Name -replace '^D10', 'D8' }

What this does:

  • Get-ChildItem -Filter “D10 *” grabs only files starting with D10
  • Rename-Item renames them
  • -replace '^D10', 'D8' swaps only the leading D10, not any later occurrences

Dry run (optional but wise)

To preview first, add -WhatIf:

Get-ChildItem -Filter "D10 *" | Rename-Item -NewName { $_.Name -replace '^D10', 'D8' } -WhatIf
  • windows/start.txt
  • Last modified: 2026/04/23 17:11
  • by mh