

Filter supports only a single pattern, whereas -Include supports multiple ones (an array of patterns).

The wildcard pattern language supported by -Filter has fewer features than PowerShell's - notably, it doesn't support character sets/ranges such as - may unexpectedly match short (8.3) filenames, and has other legacy quirks - see this well-researched answer for the gory details. Get-ChildItem -Path C:\ -Filter *.txt works fine for matching all *.txt files in the root directory of C:, for instance.It doesn't require you to switch to Get-Item and append \* to the -Path parameter value. It is much faster than -Include due to the provider itself performing the filtering at the source, as opposed to letting PowerShell apply the filter later, after all objects have been received. Using the provider-native -Filter parameter is generally preferable to -Include, because: Thus, Get-Item -Path C:\* -Exclude *.txt - note the switch from Get-ChildItem to Get-Item and the * after C:\ - is needed to make your command work for the items located directly in C:\ only.Using the -Exclude (and also -Include) parameter with neither -Recurse nor a -Path value ending in \* often yields NO results. To target the root folder of drive C:, you must use C:\, which I'll assume is what you meant in the remainder of this answer.Targeting C: probably doesn't (always) do what you want, because C: refers to whatever happens to be the current location (working dir.) on drive C: at the moment. There are two distinct problems with your approach: To summarize and complement gravity's and Brian Reynolds's helpful answers:
