$path = "c:\yourpath\"
#set your path
$excludes = @("*.pdf", "*.csv", "*.zip")
#set files to exclude
gci -Path $path -file -exclude $excludes -recurse | Rename-Item -NewName {$PSItem.Name + ".csv" }
# -file does files only -exclude excludes your files you don't want to have the extension change -recurse does subfolders
Bulk add extension recursive and skip files
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.