Hi
Where this error?. I want to rename files and folders that have a space with underscore, but only makes me the files.
Get-ChildItem $path -Recurse |`Where-Object {$_.Name -match ' '} |
Where-Object {$_.Attributes -notmatch 'Directory'} |`
Rename-Item -NewName { $_.Name -replace ' ', '_' } -WhatIf