How can I display the time stamp of a file with seconds,
(creation date/time, modified date/time, and access date/time. All, with seconds).
from the command line?
Solution:
You could use PowerShell to get that information.
- Start PowerShell from the startmenu
- Use:
Get-ChildItem <<File or Folder>> -Force | Select-Object FullName, CreationTime, LastAccessTime, LastWriteTime, Mode, Length
It will print out the information for you. -Force
is used to get items that cannot otherwise be accessed by the user, such as hidden or system files. Additionally you can use the -Recurse
option to recurse into folders.
——— //added by barlop
PS C:Usersuser> Get-ChildItem c:qaz.png -Force | Select-Object FullName, CreationTime, LastAccessTime, LastWriteTime, Mode, LengthFullName : C:qaz.pngCreationTime : Sun 28 Apr 2013 12:12:59LastAccessTime : Sun 28 Apr 2013 12:12:59LastWriteTime : Tue 22 Jul 2008 05:01:47Mode : -a---Length : 79248PS C:Usersuser>
————– // end added by barlop
An easy way to recurse into folders and have a file that can be imported into Excel is to use:
Get-ChildItem C:ProjectX -Force -Recurse | Select-Object FullName, CreationTime, LastAccessTime, LastWriteTime, Mode, Length | Export-Csv c:tempProjectX_files.csv
//pic added by barlop