I have a few hundred JPGs that need to be renamed. I need the following simple equation applied to the existing number in each file name:
(x-290)*-1
"Vitrine Hinge.0.jpg" would become "Vitrine Hinge.290.jpg", "Vitrine Hinge.1.jpg" would become "Vitrine Hinge.289.jpg", and so on.
I have used the following:
Dir *.jpg | `
foreach {
$data = $_.name.Split(".")
Rename-Item -NewName { '(' + $data1 + '-290)(-1)' }
}
And I receive errors.
No comments:
Post a Comment