Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: comparing 2 file time date stamps

by Loops (Curate)
on Nov 07, 2014 at 15:23 UTC ( #1106500=note: print w/replies, xml ) Need Help??

in reply to comparing 2 file time date stamps

Hi there,

It's frustrating to deal with problems like this, and i'm sure you're pulling your hair out a bit. ;o) But it seems that this is not a Perl problem. Trying to look for a Perl solution may be part of the problem.

From what I gathered from your results of the tests suggested by the monks above, Perl mtime agrees with what you get when you use DIR from the command prompt. It's Windows Explorer itself that disagrees with the DIR command prompt. Take a look at this MSDN article that mentions Windows Explorer has changed the algorithm it uses to display dates, while the command line (and other mtime users presumably) have not.

This is really a question for Microsoft, no?

P.S. This thread has been very confusing to catch up on because your tests are not minimal, there is no need to compare pairs of files, and definitely not 12 pairs. Just pick a file to work with.

Replies are listed 'Best First'.
Re^2: comparing 2 file time date stamps
by craigt (Acolyte) on Nov 07, 2014 at 18:04 UTC
    Loops, GrandFather, and Corion, I'm embarrassed. I't is me. You all could not see my screen, so you could not see what the problem turned out to be.

    I don't know why, but the explorer.exe was showing different dates for the 2 directories and I did not notice it. Maybe I changed these dates and forgot it. The creation date was being shown for the stage directory and the modified date for the KY directory. I changed the date shown on explorer window showing the creation date to the modified date and all became clear. I reran all diagnostics and everything is OK.

    I should have noticed this because explorer.exe showed 'date' for the creation date and 'modified date' for that date as explorer file list headers. I leave the monastery with drooped shoulders and ask your forgiveness for wasting your time. I'm going to stand in the corner for awhile.

      Well the other monks put much more time into helping you than I did, but my guess is that they too will understand. Often when you're in these situations your mind is racing looking for solutions; you're too distracted to notice simple things. If you can catch yourself in these moments, and recheck your assumptions, i've found it's often helpful.

      In any case, glad you can put this one behind you. Chin up and carry on. ;o)

Re^2: comparing 2 file time date stamps
by craigt (Acolyte) on Nov 07, 2014 at 15:46 UTC

    I went to the command line and listed the 2 directories. The file stamps of like-named files in the 2 directories were the same. In explorer.exe, The file stamps of like-named files in the 2 directories were different.

    I think you have pointed to heart of the matter. I can't believe that there was not a lot of app cries for help on this one. Comparing stamps is a fairly common thing to do in an app.

    I'm so relieved to find this. Loops, is there a language avenue that does not use the cmd.exe stamp, but only the explorer.exe stamp?

    This could be the beginning of a long journey. I'm going to try to enjoy the trip, but I hope that the destination is a better place. ct

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1106500]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2022-05-21 05:59 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (76 votes). Check out past polls.