Skip to content

Instantly share code, notes, and snippets.

@junxy
Created December 2, 2016 02:41
Show Gist options
  • Select an option

  • Save junxy/f3d68499f3c5125f4618817ca87c8ae7 to your computer and use it in GitHub Desktop.

Select an option

Save junxy/f3d68499f3c5125f4618817ca87c8ae7 to your computer and use it in GitHub Desktop.
清理 windows temp cab_* 临时文件? PS: 这些文件不断生成占用C盘空间,暂时没找到方法,删除也没发现有什么问题,只好先用脚本定期清理一下。
Set-Location "C:\Windows\Temp"
Get-ChildItem -Filter "cab_*" | Where-Object {$_.length -gt 1 }
Get-ChildItem -Filter "cab_*" | Where-Object {$_.length -gt 1 } | Remove-Item -Force
Write-Host "done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment