mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 10:17:21 +00:00
swap to int64 to prevent error on large files.
This commit is contained in:
1 parent
c81217f99c
commit
894f93c645
2 files changed
+2
-2
No files matched your search
@@ -47,7 +47,7 @@ $Directoryex | ForEach {
|
||||
|
||||
|
||||
Function Format-FileSize() {
|
||||
Param ([int]$sizeex)
|
||||
Param ([int64]$sizeex)
|
||||
If ($sizeex -gt 1TB) {[string]::Format("{0:0.00} TB", $sizeex / 1TB)}
|
||||
ElseIf ($sizeex -gt 1GB) {[string]::Format("{0:0.00} GB", $sizeex / 1GB)}
|
||||
ElseIf ($sizeex -gt 1MB) {[string]::Format("{0:0.00} MB", $sizeex / 1MB)}
|
||||
|
||||
@@ -24,7 +24,7 @@ Get-ChildItem -Path $Directory -Recurse -Force -File -Exclude ".*" | ForEach {
|
||||
|
||||
#Change permissions
|
||||
Function Format-FileSize() {
|
||||
Param ([int]$size)
|
||||
Param ([int64]$size)
|
||||
If ($size -gt 1TB) {[string]::Format("{0:0.00} TB", $size / 1TB)}
|
||||
ElseIf ($size -gt 1GB) {[string]::Format("{0:0.00} GB", $size / 1GB)}
|
||||
ElseIf ($size -gt 1MB) {[string]::Format("{0:0.00} MB", $size / 1MB)}
|
||||
|
||||
Reference in new issue
Block a user