1
0
Files

13 lines
416 B
PowerShell
Raw Permalink Normal View History

2021-02-04 15:14:09 +03:00
$dotnetPaths = @{
2021-06-28 11:44:40 +03:00
Linux = "/usr/share/dotnet"
macOS = "$env:HOME/.dotnet"
Windows = "$env:ProgramFiles\dotnet", "$env:LocalAppData\Microsoft\dotnet"
2021-02-03 15:13:32 +03:00
}
2021-06-28 11:44:40 +03:00
foreach ($srcPath in $dotnetPaths[$args[0]]) {
if (Test-Path $srcPath) {
$dstPath = "$srcPath-" + [IO.Path]::GetRandomFileName()
Write-Host "Moving $srcPath to $dstPath"
2021-06-28 11:44:40 +03:00
Move-Item -Path $srcPath -Destination $dstPath
2021-02-03 15:13:32 +03:00
}
2021-02-04 14:24:06 +03:00
}