Skip to main content
added 9 characters in body
Source Link
lit
  • 16.5k
  • 11
  • 79
  • 146

This will use a filter based on an item in the $numset array

$numset = @('003', '005')

foreach ($base in $numset) {
    Get-ChildItem -Directory -Recurse -Filter $($base + "*")
}

This will use a filter based on an item in the $numset array

$numset = @('003', '005')

foreach ($base in $numset) {
    Get-ChildItem -Directory -Filter $($base + "*")
}

This will use a filter based on an item in the $numset array

$numset = @('003', '005')

foreach ($base in $numset) {
    Get-ChildItem -Directory -Recurse -Filter $($base + "*")
}
deleted 68 characters in body
Source Link
lit
  • 16.5k
  • 11
  • 79
  • 146

The -Path parameter accepts an array of names. This would get the directories namedwill use a filter based on an item in the $numset array. If you want something different, please say so.

$numset = @('003', '005')

foreach ($base in $numset) {
    Get-ChildItem -Path $numsetDirectory -DirectoryFilter $($base + "*")
}

Ok. So, that does not get the "rev" directories. Just a min...

The -Path parameter accepts an array of names. This would get the directories named in the $numset array. If you want something different, please say so.

Get-ChildItem -Path $numset -Directory

Ok. So, that does not get the "rev" directories. Just a min...

This will use a filter based on an item in the $numset array

$numset = @('003', '005')

foreach ($base in $numset) {
    Get-ChildItem -Directory -Filter $($base + "*")
}
added 66 characters in body
Source Link
lit
  • 16.5k
  • 11
  • 79
  • 146

The -Path parameter accepts an array of names. This would get the directories named in the $numset array. If you want something different, please say so.

Get-ChildItem -Path $numset -Directory

Ok. So, that does not get the "rev" directories. Just a min...

The -Path parameter accepts an array of names. This would get the directories named in the $numset array. If you want something different, please say so.

Get-ChildItem -Path $numset -Directory

The -Path parameter accepts an array of names. This would get the directories named in the $numset array. If you want something different, please say so.

Get-ChildItem -Path $numset -Directory

Ok. So, that does not get the "rev" directories. Just a min...

Source Link
lit
  • 16.5k
  • 11
  • 79
  • 146
Loading