Get-ChildItem -Path ‘C:\path\*.old’ -Recurse | Remove-item Gets a list of all files in a folder and sub folders with the extension .old and then deletes them.
Category Archives: Uncategorized
Powershell Rename File extensions in Sub Directories
Get-ChildItem -Path ‘C:\path\*.old’ -Recurse | Rename-Item -NewName { $_.Name -replace ‘.old’,’.new’} Get a list of the files in folders and subfolders with the extension .old and renames them with extension .new