Change file timestamp on Windows

Run Set-ItemProperty with PowerShell.

Change last modified datetime

> Set-ItemProperty "<PATH TO FILE>" -Name LastWriteTime -Value "<DATETIME STRING>"

Change creation datetime

> Set-ItemProperty "<PATH TO FILE>" -Name CreationTime -Value "<DATETIME STRING>"

It seems to be good that the DATETIME STRING format specified for -Value is a standard date and time string that can be parsed with .NET, such as "2018/06/01 12:27:59".

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.