Board logo

标题: [文件操作] 批处理有没有根据文件名修改创建时间的方法? [打印本页]

作者: flobull    时间: 2021-10-20 18:49     标题: 批处理有没有根据文件名修改创建时间的方法?

有没有根据文件名修改创建时间的方法?
作者: Batcher    时间: 2021-10-20 21:38

回复 1# flobull


    请举个例子说明一下具体需求
作者: idwma    时间: 2021-10-21 00:10

如果文件名是时间
  1. powershell "$a=dir 2021-01-01.txt;$a.CreationTime=[datetime]::parse($a.basename)"
复制代码





欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2