Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Converting the FileSystemObject's DateLastAccessed Property


Windows PowerShell


Definition: Returns the date and time the file was last accessed.

DateLastAccessed


The LastAccessTime property of the file will give you the - well, yes, the time a file was last accessed. First get a reference to the file with the Get-Item cmdlet, then retrieve the LastAccessTime property:


(Get-Item c:\scripts\test.txt).LastAccessTime


See conversions of other FileSystemObject methods and properties.
Return to the VBScript to Windows PowerShell home page

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.