zoukankan      html  css  js  c++  java
  • window中使用powershell修改文件的创建、更新、上次访问时间

    1 设置的时间格式为

    "MM/dd/yyyy HH:mm:ss"
    
    //例如 2020年10月14日 16:00:00
    10/14/2020 16:0:0

    2 常用命令

    // 修改创建时间
    $(Get-Item abc.txt).creationtime=$(Get-Date "10/14/2020 20:42:23")
    // 修改上次访问时间
    $(Get-Item abc.txt).lastaccesstime=$(Get-Date "10/14/2020 20:42:23")
    // 修改上次写入时间
    $(Get-Item abc.txt).lastwritetime=$(Get-Date "10/14/2020 20:42:23")
  • 相关阅读:
    第四章的知识点:
    第一章的知识点:
    13
    12
    11
    10
    9
    zy
    金嘉琪 作业
    1022作业
  • 原文地址:https://www.cnblogs.com/zhaopengcheng/p/13815439.html
Copyright © 2011-2022 走看看