X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/blobdiff_plain/dfb762f4ce558ec8f33edcf9d4e5a2cea445930e..7517cc10a1bea7f6226e5748591b404252f589f9:/psmodules/drivespace.psm1?ds=inline diff --git a/psmodules/drivespace.psm1 b/psmodules/drivespace.psm1 index 47527c3..19fdc5e 100644 --- a/psmodules/drivespace.psm1 +++ b/psmodules/drivespace.psm1 @@ -21,5 +21,21 @@ function Show-Drivespace() { } } +function Show-DrivespacePretty() { + Start-Job -Name "FileCollection" -ScriptBlock { Show-Drivespace } +While((Get-Job -Name "FileCollection").State -eq "Running") { + Write-Progress -Activity "Collecting Files..." -PercentComplete $x + If($x -eq 100){ + $x = 1 + } + Else{ + $x += 1 + } +} +Write-Progress -Activity "Collecting Files..." -Completed +$Files = Get-Job -Name "FileCollection" | Receive-Job +Get-Job -Name "FileCollection" | Remove-Job +} + Export-ModuleMember -Function Show-Drivespace Export-ModuleMember -Function Show-LargeFiles