Windows 批量修改文件时间

原文链接:https://blog.csdn.net/huangfujin321/article/details/107951410

PowerShell 里面执行

更改为当前时间:

Get-Childitem -path ‘D:\Tomcat7\webapps’ -Recurse | foreach-object { $_.LastWriteTime = Get-Date ; $_.CreationTime = Get-Date }

更改为指定时间:

Get-Childitem -path ‘D:\Tomcat7\webapps’ -Recurse | foreach-object { $_.LastWriteTime = Get-Date ; $_.CreationTime = ‘08/12/2020 10:18:36’ }