Hi H.
You could try something like this:
Get-ChildItem -Path $sourcedir | foreach { if ($_ -match "(\d{10})" ) { Rename-Item -Path $_.FullName -newName "$($matches[0])$($_.Extension)" } }
It's not pretty, but it works
Hi H.
You could try something like this:
Get-ChildItem -Path $sourcedir | foreach { if ($_ -match "(\d{10})" ) { Rename-Item -Path $_.FullName -newName "$($matches[0])$($_.Extension)" } }
It's not pretty, but it works