2
Rekumbens
Could you be so kind as to give it another try to run the PowerShell script as well?
Here's the modified button (for p.ps1 as you named it, to run it from the active panel)
Code: Select all
TOTALCMD#BAR#DATA
powershell -executionpolicy bypass .\p.ps1
WCMICONS.DLL
PowerShell_inventoryRecount
0
-1
And here's the script (modified a bit regarding your screenshot: removed literal source folder definition; added a part to display the renumbered items):
p.ps1 (as you named it)
Code: Select all
$id = 62000
$tif = Get-ChildItem -path $pwd -filter *.tif -recurse|Sort-Object -property FullName
$tif | Where-Object {$_.Name -match '\d{5}' -and $_.Name -notmatch '\d{6}'}|Rename-Item -NewName {$_.Name -replace "\d{5}",$script:id++} -PassThru|Foreach-Object {Write-Host $_.Name -f Yellow}