Skip to content

Commit ab30895

Browse files
Update Count_Files_In_Giant_Directory.ps1
1 parent 3ae614f commit ab30895

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

General/Count_Files_In_Giant_Directory.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $jobs = @();
44
$dir_todo = "\\path\to\directory"
55
$max_running_jobs = 20
66
gci $dir_todo -Directory | %{
7-
while (($jobs | where State -eq Running).Count -gt $max_running_job) { Sleep -Seconds 1 }
7+
while (($jobs | where State -eq Running).Count -gt $max_running_jobs) { Sleep -Seconds 1 }
88
$jobs+= start-job -ScriptBlock {(gci $args[0] -File -Recurse).count} -ArgumentList $($_.FullName)
99
}
1010

0 commit comments

Comments
 (0)