Sander Tuulik AK41
From ICO wiki
$op_file = $args[0]
if (! $op_file) {
Write-Host
$op_file = Read-Host "Millisest kataloogist otsida samanimelisi faile?"
}
Write-Host "Samanimelisi faile otsiti kataloogist: $op_file"
$Dir = get-childitem $op_file -recurse
$List = $Dir
$dir1 = $list | group | ? {$_.count -gt 1}| % {$_.group}
echo ""
if(!$dir1){Write-Host "Samanimelisi faile polnud kataloogis: $op_file"}
$dir1 | format-table -a fullname