delay-bind Questions
3
How can I batch rename files in powershell using the following code:
$nr=1;Get-ChildItem -Filter *.jpg |
Rename-Item -Newname {"PPPPPPP_{0:d3}.jpg" -f $global:nr++}
where PPPPPPP is the name o...
Lightman asked 20/11, 2018 at 12:26
3
Solved
I'm looking at the documentation of PowerShell's Rename-Item cmdlet and there is an example like this.
Get-ChildItem *.txt | Rename-Item -NewName { $_.name -Replace '\.txt','.log' }
This example ...
Cluck asked 14/10, 2018 at 18:28
1
© 2022 - 2024 — McMap. All rights reserved.