0

I am trying to use the GCI command to call all the files within a folder bar the ones with "december" in their name.

I would also like to not call files from a subfolder called "months".

Tunaki
  • 132,869
  • 46
  • 340
  • 423

1 Answers1

0

Try this:

Get-ChildItem c:\somefolder -exclude months,*december*

The Exclude parameter accepts an array of terms to exclude. These terms can include wildcard characters.

Keith Hill
  • 194,368
  • 42
  • 353
  • 369