Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Get a big list of files of unknown size
- $files = @(dir $env:SystemRoot | select -First (Get-Random -Minimum 10 -Maximum 100))
- # Create progressbar
- $bar = New-Progressbar -TotalCount $files.Count -ActivityName "Processing files"
- # Pretend to process files in order to progress the progressbar
- $files | foreach {
- $bar.Progress($_.Name)
- sleep -Milliseconds 100
- }
- # Complete the progressbar
- $bar.Complete()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement