Link to home
Start Free TrialLog in
Avatar of Tom-J-Lael
Tom-J-LaelFlag for Afghanistan

asked on

Powershell help - finding files lastwritetime

I'm trying to create a PS script that finds files (non-recursively) prior to a certain date.

Get-ChildItem e:\cadcam\scandata | Where-Object {$_.LastWriteTime -lt "1/1/2008 00:01 AM"

when I press enter..nothing happens..no errors...nothing


help?
ASKER CERTIFIED SOLUTION
Avatar of Xaelian
Xaelian
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Manpreet SIngh Khatra
Manpreet SIngh Khatra
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tom-J-Lael

ASKER

Thanks...I found that the issue was because I did not have the } at the end of my script.

i did not want to recurse because I only wanted what was in the parent folder.