Try this:
$d = [datetime](Get-ItemProperty -Path $source -Name 
LastWriteTime).lastwritetime
Using the name you can parse the second directory and use the compare cmdlet. 

Cesar A.
Meaning is NOT in words, but inside people! Dr. Myles Munroe
My iPad takes half the blame for misspells.

> On Dec 10, 2013, at 6:34 AM, "Charlie Kaiser" <[email protected]> 
> wrote:
> 
> Is this any better? 
> 
> PS C:\Windows\system32> Get-childItem -Path c:\users\me\test\* |
> select-object lastaccesstime
> 
> There might be a way to trim the date further but I don't know it offhand...
> 
> 
> ***********************
> Charlie Kaiser
> [email protected]
> Kingman, AZ
> ***********************
> 
> 
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of James Rankin
> Sent: Tuesday, December 10, 2013 4:27 AM
> To: [email protected]
> Subject: [NTSysADM] PowerShell is my weakness....
> 
> I'm trying to compare the date/time stamps of two folders (including all the
> included files and subfolders). So far, this seems to do the trick
> 
> 
> get-childitem c:\users\me\test\* | select -expandproperty lastaccesstime
> 
> 
> but the problem is it pumps out the date in a long format - how can I get it
> to be a short format so I can easily compare the two?
> 
> 
> TIA,
> 
> 
> 
> 
> 
> -- 
> James Rankin 
> Technical Consultant (ACA, CCA, MCTS)
> http://appsensebigot.blogspot.co.uk
> 
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2014.0.4259 / Virus Database: 3658/6905 - Release Date: 12/09/13
> 
> 
> 
> 

Reply via email to