# 删除指定文件
PS D:\Data\Documents> Remove-Item * -Include *.json -Recurse
# 删除文件而保留文件夹
# 「This example deletes all of the files that have names that include a dot (.) 」
PS D:\Data\Documents> Remove-Item * -Include *.* -Exclude *.md -Recurse
# 删除包含指定字符的文件夹
# 一定要注意加上通配符「*bin*」,否则只会删除bin这样的文件夹
PS D:\Data\Documents> Remove-Item * -Recurse -Include *bin*
注意添加 * 作为路径
参考资料