mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-09 22:41:00 +01:00
Improved the scripts
This commit is contained in:
parent
9d3553093d
commit
25df5e5ae7
@ -11,7 +11,7 @@ param([string]$Dir = "")
|
|||||||
function ListDirectory { param([string]$Path)
|
function ListDirectory { param([string]$Path)
|
||||||
$Items = get-childItem -path $Path
|
$Items = get-childItem -path $Path
|
||||||
foreach ($Item in $Items) {
|
foreach ($Item in $Items) {
|
||||||
if ($Item.Mode -eq "d----") {
|
if ($Item.Mode -like "d*") {
|
||||||
New-Object PSObject -Property @{ Filename = "$($Item.Name)/" }
|
New-Object PSObject -Property @{ Filename = "$($Item.Name)/" }
|
||||||
} else {
|
} else {
|
||||||
New-Object PSObject -Property @{ Filename = "$($Item.Name)" }
|
New-Object PSObject -Property @{ Filename = "$($Item.Name)" }
|
||||||
|
@ -14,7 +14,7 @@ try {
|
|||||||
}
|
}
|
||||||
$Items = get-childItem -path $Directory
|
$Items = get-childItem -path $Directory
|
||||||
foreach ($Item in $Items) {
|
foreach ($Item in $Items) {
|
||||||
if ($Item.Mode -eq "d----") {
|
if ($Item.Mode -like "d*") {
|
||||||
$Filename = $Item.Name
|
$Filename = $Item.Name
|
||||||
write-host ""
|
write-host ""
|
||||||
write-host -nonewline "Updating $Filename ..."
|
write-host -nonewline "Updating $Filename ..."
|
||||||
|
Loading…
Reference in New Issue
Block a user