I'm trying to find all instances of files with names like VAT*.xls where the creation date is less than 6 months ago. I have tried:
dir c:\vat*.xls -r | ? {($now -$_.lastwritetime).days -lt 300}
and
gci c:\vat*.xls -r | ? {($now -$_.lastwritetime).days -lt 300}
I know there is a file VAT0210.xls dated 1 April 2010 but neither query gives me that answer. What should it be?