TechNet
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Converting the FileSystemObject's DateCreated Property


Windows PowerShell


Definition: Returns the date and time the file was created.

DateCreated


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


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


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

Show:
© 2016 Microsoft