Share via

Why did the meaning of "Date modified" change? How can I get around it?

Anonymous
2025-06-12T22:49:05+00:00

I work in healthcare - with a program that creates a couple of files each time a patient gets an eye exam. The file structure is patient-level folders, with exam-level files within the folders.

I want to do incremental backups. In years prior, I could sort the folders by Date Modified, and copy over any folders with dates more recent than my last incremental backup. However, recently I noticed a problem: only NEW patient folders were showing up with recent Date Modified. No returning patients were among the recently modified. I discovered the issue is that the meaning of Date Modified apparently changed, around April 2024, possibly with upgrade to Windows 10.

I can tell it changed, because for example, I am one of the "patients" - new employees examine my eyes during training. My folder was created in 2017. I have eye exams (files) throughout the years. The Date Modified for my folder is 4/2/2024. But I have additional exams e.g. 10/2024, 12/2024, 3/2025. New files were created on those dates that I can see within my patient-level folder. The Date Modified for my folder did not update, when those files were added or edited. Obviously it was updating until 4/2/2024 - otherwise it would just be 2017. I tested it today, so there are new files in my patient folder generated 6/2025, but the folder Date Modified still says 4/2/2024.

I can search File Explorer for new files updated since 4/2024. I can see the path of the files, as long as they stay where they are. However, my file names do not relate to the patients. For example, my latest eye exam file might be named 0001247. This number has no relation to me, the patient. If I copy the latest files to my network drive with mirrored backup, where it would be safe, after copying there, the files with no relation to patient have no meaning. I have no way to derive that 0001247 belongs to patient 607 and needs to be dropped in the folder for patient 607. I MUST retain the structure of the files WITHIN patient folders. I want to export WHOLE FOLDERS, but ONLY folders that contain recently added/edited files. There might only be 8 patients with updated files in the last month. To back them up, now I would have to export 1200 patients with 200 GB of data every time, just because there's no way to tell which 8 patient folders had updates within.

It takes about 4 days to copy and paste 200 GB. I can't copy all 1200 patient folders at a time, or it will crash. So it needs to be babysat moving ~50 at a time.

Changing this Date Modified without notice resulted in lack of safely mirrored backups for patient data for about a year. Every returning patient's data was missed in the backup. Grr.

Is there some other date attribute that shows what the former Date Modified used to capture -- that is, the date any file WITHIN A FOLDER was added or changed?

Windows for home | Windows 10 | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2025-06-13T08:14:06+00:00

Hello Louis 

Welcome to the Microsoft Community. 

Regarding the modification date attribute of the file you mentioned, you can refer to the following link: 

Description of NTFS date and time stamps for files and folders 

It's a pity that in the Windows system, we cannot manually intervene in the attributes of files. You can try to handle it through the following script. 

#Set Parameters 

$sourceRoot = "D:\PatientData" 

$backupRoot = "Z:\Backups\June2025" 

$cutoffDate = Get-Date "2024-04-01" 

$maxBatchSize = 50 

$logFile = "$backupRoot\backup_log.txt" 

#Create a log file 

New-Item -Path $logFile -ItemType File -Force | Out-Null 

"Add-Content-Path $logFile-Value" Backup start time: $(Get-Date)" 

#Obtain all patient folders 

$patientFolders = Get-ChildItem -Path $sourceRoot -Directory 

#Initialize the counter 

$batchCount = 0 

foreach ($folder in $patientFolders) { 

    $folderPath = $folder.FullName 

#Check if there are any files in this folder that have been modified after cutoffDate 

    $recentFiles = Get-ChildItem -Path $folderPath -Recurse -File | Where-Object { $_.LastWriteTime -gt $cutoffDate } 

    if ($recentFiles.Count -gt 0) { 

#Build the target path 

        $relativePath = $folder.FullName.Substring($sourceRoot.Length) 

        $targetPath = Join-Path $backupRoot $relativePath 

#Create the target folder 

        New-Item -Path $targetPath -ItemType Directory -Force | Out-Null 

#Copy the entire patient folder 

        robocopy $folder.FullName $targetPath /E /COPYALL /R:1 /W:1 | Out-Null 

#Write Log 

Add-Content-Path $logFile-Value "Backed up: $folderPath" 

        $batchCount++ 

If the batch limit is reached, pause and give a prompt 

        if ($batchCount -ge $maxBatchSize) { 

"Writing-host" has copied $batchCount folders. Please check and continue to run the script to copy the next batch. 

"Add-Content-Path $logFile-Value" is paused at: $(Get-Date), and $batchCount folders have been copied. 

            break 

"Add-Content-Path $logFile-Value" Backup end time: $(Get-Date)" 

"Write-Host" Backup completed. The log file is located at: $logFile" 

Best Regards, 

Henry-N - MSFT | Microsoft Community Support Specialist

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2025-06-13T16:48:51+00:00

    Hi Henry,

    aaaaaaaahhhhh I never knew that about the attributes sticking in different ways in NTFS vs FAT. This is so silly.

    Your explanation offers a simple solution for my issue: This program has a patient database on the desktop NTFS. Then it is archived to an external drive, which of course was changed to a solid-state exFAT drive around April 2024. I am accustomed to grabbing data from the archive. All I have to do is grab the data from the desktop. I found the folders with appropriate/useful Date Modified dates there. I could also reformat an external drive as NTFS to prevent confusion when someone looks at this 8 years from now and doesn't understand the date discrepancies.

    Thanks so much!

    Dana

    Was this answer helpful?

    0 comments No comments