Can someone please explain the difference between -Include
and -Filter
options in the Get-ChildItem
command .
Below are the two pieces of code that I am trying to execute . They both serve to find out the text files in a particular directory:
PS C:Users352997> get-childitem -path DesktopExtras -filter *.txt
Directory: C:Users352997DesktopExtras
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 12/22/2014 4:05 PM 140 Expense_report.txt
-a--- 1/14/2015 4:41 PM 211 Extras.txt
-a--- 2/10/2015 2:46 PM 259 Learn Dutch.txt
PS C:Users352997> get-childitem -path DesktopExtras -include *.txt
--The above command produces no result ----
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…