FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
PowerShell/ProgressBar.ps1 at master · sperner/PowerShell · GitHub
sperner
/
PowerShell
Public
Notifications
You must be signed in to change notification settings
Fork
32
Star
57
Code
Issues
0
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
PowerShell
/
ProgressBar.ps1
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (12 loc) · 461 Bytes
Breadcrumbs
PowerShell
/
ProgressBar.ps1
Copy path
File metadata and controls
18 lines (12 loc) · 461 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#
Example of using a progressbar
#
(calculating sum of all .dll files under C:\WIN)
$colFiles
=
Get-ChildItem
C:\WIN
-
include
*
.dll
-
recurse
foreach
(
$objFile
in
$colFiles
)
{
$i
++
$intSize
=
$intSize
+
$objFile
.Length
Write-Progress
-
activity
"
Adding File Sizes
"
-
status
"
Percent added:
"
`
-
PercentComplete ((
$i
/
$colFiles
.length
)
*
100
)
}
$intSize
=
"
{0:N0}
"
-f
$intSize
Write-Host
"
Total size of .DLL files:
$intSize
bytes.
"
Back
|
FazBrowse Home
|
New Git URL