Board logo

标题: [文件操作] 批处理如何获取文件修改时间,毫秒 [打印本页]

作者: fantasy_07    时间: 2021-7-22 08:49     标题: 批处理如何获取文件修改时间,毫秒

我看了下论坛里的提问,貌似只有
  1. wmic datafile where "Name='C:\\Windows\\notepad.exe'" get LastModified /value
复制代码
1、想问下,在for语句中,怎么使用这个呢?
  1. (for /f "delims=" %%i in ('dir F:\bapdffile  /s /b /a-d-h') do (
  2. echo %%i,%%~nxi,%%~zi,%%~ti:00.000,!date:~0,10! !time!0
  3. wmic datafile where "Name='C:\\Windows\\notepad.exe'" get LastModified /value
  4. )
  5. )>3.txt
复制代码
2、除了用wmic,还有其他方法吗?




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