Files and Folders Slideshow

  1. # This is the winner, as it takes into account special characters in the file name 
  2. Get-ChildItem | Where { $_.Name -match "^[0-9]{2}\s.*" } | ForEach-Object { $NewName = $_.Name -replace "^[0-9]{2}\s",""; [System.IO.File]::Move($_.FullName, $_.DirectoryName + $NewName) } 
 
Loading...
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.