Tuesday, December 16, 2014

How to rename multiple sub-folders with PowerShell

$folders = gci 'C:\Users\luge\Crypt\HBI\*\*' | % {$_.FullName}
foreach ($folder in $folders)
   {
if ($folder -like '*CSS MPS Reports UK')
{
rename-item -path $Folder -NewName 'MPSREP_UK'
   }
}


1 comment: