Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Range Operator for first 2 letters of item

$
0
0

Hello all,

Quick question about range operators in PowerShell. The following code uses a range operator to return all items under C:\ that start with A, B, or C:

Get-ChildItem 'C:\[a-c]*'
Is it possible to have a range operator that would get me items that started with 2 or more letters, e.g. items that start with 'Ab' - 'Ag', or items that start with 'Co' - 'Cz'?

Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>