Por que algumas pastas seriam copiadas com o timestamp errado?

2

Ao copiar pastas de um cartão microSD formatado em FAT16 para um volume NTFS, por que algumas (mas não todas) das pastas teriam um registro de data e hora modificado da data / hora atual no destino?

Algumas das pastas de destino têm registros de data e hora que correspondem às pastas de origem, mas algumas são copiadas com carimbos de data e hora sendo alterados para refletir a data / hora atual.

O Windows File Explorer do Windows 7 SP1 foi usado para copiar as pastas. Chkdsk foi executado na origem e no destino, sem erros encontrados.

    
por RockPaperLizard 06.08.2016 / 05:32

1 resposta

2

Uma explicação geral da Microsoft

Description of NTFS date and time stamps for files and folders

SUMMARY

This article describes how file and folder date and time stamps (created or modified) are displayed based on the file system that is in use (FAT or the NTFS file system), and the partition (whether the action occurred on the same partition or across partitions).

MORE INFORMATION

File properties with regards to the date and time stamps

  • If you copy a file from C:\fat16 to C:\fat16\sub, it keeps the same modified date and time but it changes the created date and time to the current date and time.
  • If you move a file from C:\fat16 to C:\fat16sub, it keeps the same modified date and time and keeps the same created date and time.
  • If you copy a file from C:\fat16 to D:\NTFS, it keeps the same modified date and time but changes the created date and time to the current date and time.
  • If you move a file from C:\fat16 to D:\NTFS, it keeps the same modified date and time and keeps the same created date and time.
  • If you copy a file from D:\NTFS to D:\NTFS\SUB, it keeps the same modified date and time but changes the created date and time to the current date and time.
  • If you move a file from D:\NTFS to D:\NTFS\SUB, it keeps the same modified date and time and keeps the same created date and time.
  • In all examples, the modified date and time of a file does not change unless a property of the file has changed. The created date and time of the file changes depending on whether the file was copied or moved.

Folder properties with regards to the date and time stamps

  • 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.

source

Conclusão

À procura de pontos comuns

Foi determinado que. . .

Every folder that had its timestamp copied contained no files. Every folder that did not have its timestamp copied did contain files. The opposite of what I wanted. I've lost the folder timestamps, but in the future I will use Robocopy for this type of task. – RockPaperLizard

Portanto, ao copiar pastas de uma origem para um local de destino com o Windows File Explorer , parece que é exatamente como ele preserva ou não os atributos de carimbo de data / hora da pasta nesse tipo de operação por padrão.

Prevenção

Reter data Atributos do carimbo de data / hora das pastas

Como sugerido nesta Artigo do MS TechNet você pode usar Robocopy /DCOPY:T para preservar os valores do atributo de carimbo de data / hora da pasta de origem original ( /DCOPY:T : Copy Directory Timestamps. ) quando é copiado para o local de destino.

    
por 06.08.2016 / 06:24