Different date stamps Explorer vs. from command line - Win7

1

I'm trying to create a simple batch file to match up 2 directories of files to resolve some issues between the 2 sets. This would be very easy to do if I could match them between directories based upon the creation date and time (spanning about 5 years) I see when I look at the 2 directories in Explorer. But when I do a dir or forfiles, I get the same date for all the files and the time increases by a second or 2 for each file. I assume it's showing when each file was added to the Zip file that was sent to me. I've tried dir/TC, /TA, and /TW and the corresponding syntax for forfiles, but the only difference any of them make is to give me what seems to be the date/time stamp for when I extracted the files.

Gene T

Posted 2015-10-26T16:03:06.357

Reputation: 11

Check out Robocopy from Windows 7. Just type in Robocopy /? and it should be there by default. It's way more robust than trying to do something elaborate with batch script and date time substitutions with batch commands. Also, look into 7zip for finding the attributes of files within Zip files as it has command line syntax you can run from Windows. Just some quick suggestions. I recall doing something in batch before but it wasn't simple so let me know if you find a simple way of comparing file date attributes natively. . . Example: FOR %%A IN ("%srcdir%\%~1") DO IF NOT "%~2"=="%%~NXTA" – Pimp Juice IT – 2015-10-26T17:36:19.093

1I figured out my problem - I'm dealing with TIFF files and Win7 Explorer recognizes them as such and is using the date stamp that's stored inside each TIFF rather than the file's date stamp. Sneaky background process tripped me up. – Gene T – 2015-10-27T16:27:32.557

Perhaps it's just the view options (or columns) you have configured in these particular folders to show from Windows Explorer that show extended attributes or metadata of the TIFF image files? Not sure if the column name of Date Modified are showing the wrong dates if the column name in Windows Explorer is named differently than that, but something else to check--sounds like metadata fields or something that's being looked at from Windows Explorer. Good catch regardless though. – Pimp Juice IT – 2015-10-27T16:49:55.410

That's exactly right. It was the metadata fields I needed, hence the problem. – Gene T – 2015-10-27T17:16:21.760

No answers