In Windows, the file system stores time attributes for each file with a certain level of precision. For example, the exFAT file system stores time attributes with a 10-millisecond resolution, while the NTFS file system stores time attributes with a 100-nanosecond resolution. In this article, we will show you how to view the exact millisecond file timestamp in Windows.
File Time Attributes in Windows
Windows stores the following time attributes for each file:
- Creation time (CTime)
- Last write time (MTime)
- Last access time (ATime)
- Change time (CTime)
These time attributes are stored as FILETIME structures, which represent the number of 100-nanosecond intervals since January 1, 1601 (UTC). The resolution of these time attributes depends on the file system used. The exFAT file system stores time attributes with a 10-millisecond resolution, while the NTFS file system stores time attributes with a 100-nanosecond resolution.
Viewing File Time Attributes in Windows
Windows provides several ways to view the file time attributes, including the following:
Using the Command Prompt
You can use the dir command in the Command Prompt to view the file time attributes with a 1-second resolution. To view the file time attributes with a higher resolution, you can use the fsutil command.
For example, to view the creation time of a file with a 1-second resolution, you can use the following command:
C:> dir /tc "file.txt"To view the creation time of a file with a 100-nanosecond resolution, you can use the following command:
C:> fsutil file time query "file.txt"Using PowerShell
You can use PowerShell to view the file time attributes with a 1-second resolution. To view the file time attributes with a higher resolution, you can use the Get-Date cmdlet.
For example, to view the creation time of a file with a 1-second resolution, you can use the following command:
PS C:\> (Get-Item "file.txt").CreationTimeTo view the creation time of a file with a 100-nanosecond resolution, you can use the following command:
PS C:\> (Get-Item "file.txt").CreationTime.TicksUsing File Explorer
You can use File Explorer to view the file time attributes with a 1-second resolution. However, File Explorer does not provide a way to view the file time attributes with a higher resolution.
In this article, we have shown you how to view the exact millisecond file timestamp in Windows. You can use the Command Prompt, PowerShell, or File Explorer to view the file time attributes. If you need to view the file time attributes with a higher resolution, you can use the fsutil command in the Command Prompt or the Get-Date cmdlet in PowerShell.