Copy files where lastwritetime -ge 3/26/2010 9:00pm with Powershell

Posted by Emo on Stack Overflow See other posts from Stack Overflow or by Emo
Published on 2010-04-13T21:58:42Z Indexed on 2010/04/13 22:03 UTC
Read the original article Hit count: 732

I need to copy files in one directory to another directory where the lastwritetime is greater than or equal to 3/26/2010 9:00pm. I'm using:

Get-ChildItem C:\pstest\hlstore\folder1\data | where-object {$i.lastwritetime -ge “3/26/2010 9:00 PM”} | Copy-Item -destination c:\pstest\hlstore2\folder1\data

But nothing happens...

Any help would be greatly appreciated.

Thanks!

Emo

© Stack Overflow or respective owner

Related posts about powershell-v2.0

Related posts about get-childitem