上次修改的文件夹 [英] Last Modified of Folders

查看:158
本文介绍了上次修改的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows如何确定文件夹的最后修改日期? 根据 MSDN ,最后修改时间戳记存储在每个目录中:



  • 如果在名为D:\ NTFS1和D:\ NTFS2的NTFS分区上创建两个新文件夹,创建和修改的日期和时间都是相同的。

  • 如果将D:\ NTFS2文件夹移动到D:\ NTFS1文件夹中,创建D:\ NTFS1\NTFS2,则:


    1. D:\ NTFS1 - 创建的文件夹是相同的,并且修改后的标记更改。
    2. D:\ NTFS1 \ NTFS2 - 创建的文件夹修改后的文件夹保持不变。
      出现这种情况的原因是,即使移动了该文件夹,也会在主文件表(MFT)的D:\ NTFS1文件夹中创建一个新文件夹。


  • 如果将D:\ NTFS2文件夹复制到D:\ NTFS1文件夹中,则创建D:\ NTFS1 \ NTFS2文件夹,并将D:\\ \\ NTFS2文件夹仍然存在(复制之后):


    1. D:\ NTFS1 - 创建的文件夹与修改的文件夹时间和日期戳相同
    2. D:\ NTFS2 - 由于是原始文件夹,因此不会发生任何更改。

    3. D:\ NTFS1\NTFS2 - 创建的文件夹和修改的文件夹更改为相同的邮票,这是移动的时间。

      因为即使您复制文件夹,新文件夹被视为正在创建MFT,并给予新的创建和修改的时间戳。




注意:FAT文件系统的设计和行为与修改时间戳有所不同。在FAT文件系统上,如果文件夹的内容发生更改,则文件夹的修改日期不会更改。例如,如果您有D:\ FAT1和D:\ FAT2,并且将D:\ FAT2复制或移动到D:\ FAT1中,则D:\ FAT1的创建日期和修改日期保持不变。


How does Windows determine the last modified date of a folder?

解决方案

According to MSDN, the last modification timestamp is stored per directory:

  • If you create two new folders on an NTFS partition called D:\NTFS1 and D:\NTFS2, both the created and modified date and time are the same.
  • If you move the D:\NTFS2 folder into the D:\NTFS1 folder, creating D:\NTFS1\NTFS2, then:

    1. D:\NTFS1 - The created folder is the same and the modified stamp changes.
    2. D:\NTFS1\NTFS2 - Both the created folder changes and the modified folder stay the same. This behavior occurs because, even though you moved the folder, a new folder is seen as being created within the D:\NTFS1 folder by the Master File Table (MFT).

  • If you copy the D:\NTFS2 folder into the D:\NTFS1 folder, creating the D:\NTFS1\NTFS2 folder, and the D:\NTFS2 folder still exists (after having copied it):

    1. D:\NTFS1 - The created folder is the same and the modified folder time and date stamp changes.
    2. D:\NTFS2 - No changes occur because it is the original folder.
    3. D:\NTFS1\NTFS2 - Both the created folder and the modified folder changes to the same stamp, which is that of the time of the move.
      This behavior occurs because even though you copied the folder, the new folder is seen as being created by the MFT and is given a new created and modified time stamp.

Note: The design and behavior of the FAT file system is different with regards to the modified time stamp. On a FAT file system, the modified date of a folder does not change if the contents of the folder change. For example, if you have D:\FAT1 and D:\FAT2, and you copy or move D:\FAT2 into D:\FAT1, the created date and modified date of D:\FAT1 remains the same.

这篇关于上次修改的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆