powershell PowerShell脚本删除Visual Studio,ReSharper等生成的文件...
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了powershell PowerShell脚本删除Visual Studio,ReSharper等生成的文件...相关的知识,希望对你有一定的参考价值。
Write-Host "Cleaning up..."
$foldersToRemove =
# "bin",
"obj",
"TestResults",
"_ReSharper.*",
".vs"
$filesToRemove =
"Thumbs.db","*.suo","*.user","*.cache"
#`,"*.scc","*.vssscc","*.vspscc"
$old_ErrorActionPreference = $ErrorActionPreference
$ErrorActionPreference = 'SilentlyContinue'
#Remove Folders
Write-Host "Cleaning up folders" -ForegroundColor Yellow
Get-ChildItem .\ -include $foldersToRemove -force -recurse |
where { $_.PsIsContainer } |
foreach ($_) {
Write-Host " Removing folder ./$($_.FullName)"
Remove-Item $_.FullName -force -recurse
}
#Remove Files
Write-Host "Cleaning up files" -ForegroundColor Yellow
Get-ChildItem .\ -include $filesToRemove -force -recurse |
foreach ($_) {
Write-Host " Removing file ./$($_.FullName)"
Remove-Item $_.FullName -force -recurse
}
$ErrorActionPreference = $old_ErrorActionPreference
Write-Host "Done." -ForegroundColor Green
[void][System.Console]::ReadKey($true)
以上是关于powershell PowerShell脚本删除Visual Studio,ReSharper等生成的文件...的主要内容,如果未能解决你的问题,请参考以下文章
powershell powershell脚本列出了用户的所有个人视图,并根据需要提供删除选项。
尝试创建删除电子邮件 powershell 脚本
powershell Powershell脚本,用于从已编译的twine游戏中删除保存加密代码。
powershell 定时删除脚本
powershell 此PowerShell脚本从子站点组等于值的所有子站点中删除组。如果要删除gro,请使用此选项
powershell 此powershell脚本生成新证书,从IISExpress ssl端口删除旧证书分配并添加新证书