{"id":2519,"date":"2024-05-03T12:44:15","date_gmt":"2024-05-03T19:44:15","guid":{"rendered":"https:\/\/www.curlybrace.com\/words\/?p=2519"},"modified":"2024-05-31T12:02:58","modified_gmt":"2024-05-31T19:02:58","slug":"using-powershell-to-change-files-created-modified-access-timestamps","status":"publish","type":"post","link":"https:\/\/www.curlybrace.com\/words\/2024\/05\/using-powershell-to-change-files-created-modified-access-timestamps\/","title":{"rendered":"Using PowerShell To Change File&#8217;s Created\/Modified\/Access Timestamps"},"content":{"rendered":"<p>File timestamps can be modified on Windows using PowerShell.<br \/>\nCommand Syntax:<\/p>\n<pre class=\"PowerShell\">\r\n(Get-Item YourFilePath).CreationTime = \"mm\/dd\/yyyy hh:mm\"\r\n<\/pre>\n<p>Time can be specified using a 24-hour clock, or using am\/pm.<\/p>\n<p>There are three settable timestamps:<\/p>\n<ul>\n<li>CreationTime will affect the Created timestamp.<\/li>\n<li>LastWriteTime will change the Modified timestamp.<\/li>\n<li>LastAccessTime will change the Accessed timestamp.<\/li>\n<\/ul>\n<p>Example:<\/p>\n<pre class=\"PowerShell\">\r\n(Get-Item MyFilename).CreationTime = \"10\/23\/2017 12:56pm\"<br \/>(Get-Item MyFilename).LastWriteTime = \"10\/23\/2017 12:56pm\"<br \/>(Get-Item MyFilename).LastAccessTime = \"10\/23\/2017 12:56pm\"\r\n<\/pre>\n<p>Results (from the File Explorer file properties dialog):<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.curlybrace.com\/words\/wp-content\/uploads\/2024\/05\/FileExplorer-FileProperties-Timestamps.png\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>File timestamps can be modified on Windows using PowerShell. Command Syntax: (Get-Item YourFilePath).CreationTime = &#8220;mm\/dd\/yyyy hh:mm&#8221; Time can be specified using a 24-hour clock, or using am\/pm. There are three settable timestamps: CreationTime will affect the Created timestamp. LastWriteTime will &hellip; <a href=\"https:\/\/www.curlybrace.com\/words\/2024\/05\/using-powershell-to-change-files-created-modified-access-timestamps\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,283],"tags":[],"class_list":["post-2519","post","type-post","status-publish","format-standard","hentry","category-technology","category-windows-technology"],"_links":{"self":[{"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/posts\/2519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/comments?post=2519"}],"version-history":[{"count":19,"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/posts\/2519\/revisions"}],"predecessor-version":[{"id":2553,"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/posts\/2519\/revisions\/2553"}],"wp:attachment":[{"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/media?parent=2519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/categories?post=2519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/tags?post=2519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}