Created
November 1, 2017 18:57
-
-
Save AlbertoMonteiro/bd515d5846786c59e540d1c5ffe44d4f to your computer and use it in GitHub Desktop.
Remover arquivos com powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[regex]$reg = "(?<name>.+?)(\.\d+){3,4}\.nupkg$"; | |
ls *.nupkg | sort -Descending | group { $reg.Match($_.Name).Groups["name"].Value } | where { $_.count -gt 1 } | % { $_.group | select -Skip 5 } | del |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment