batch script that tells me when was the last time a file has been accessed

前端 未结 3 862
执笔经年
执笔经年 2021-01-24 21:01

I have a list of sales orders in a folder. I want a batch script that can output into a txt file, when were all the files last accessed but not necessarily modified.

3条回答
  •  鱼传尺愫
    2021-01-24 21:18

    As others have said, Last Access Date is not reliable on NTFS. But if you wanted to extract it anyway, here is one way, but it will need a bit more parsing:

    wmic DataFile where "Name='C:\\Users\\Default\\NTUSER.DAT'" get LastAccessed /value
    

提交回复
热议问题