http://qs321.pair.com?node_id=1106403


in reply to Re^4: comparing 2 file time date stamps
in thread comparing 2 file time date stamps

Yes. If you have a space in the filename, you will need to quote the filename when passing it to dir, just like on the command line:

system qq(dir "$file");

Replies are listed 'Best First'.
Re^6: comparing 2 file time date stamps
by craigt (Acolyte) on Nov 06, 2014 at 16:47 UTC
    Thanks for the help. Here is the result.
    Checking 'c:\Steep\USA Data\State\KY\KY2.gif'
     Volume in drive C is TI106426W0A
     Volume Serial Number is 00FF-BD6D
    
     Directory of c:\Steep\USA Data\State\KY
    
    11/05/2014  07:52 PM             1,687 KY2.gif
                   1 File(s)          1,687 bytes
                   0 Dir(s)  423,609,860,096 bytes free
    Mtime: 1415235120
    As string: Wed Nov  5 19:52:00 2014
    
    
    
    Checking 'c:\usr\www\steepusa\stage\KY\KY2.gif'
     Volume in drive C is TI106426W0A
     Volume Serial Number is 00FF-BD6D
    
     Directory of c:\usr\www\steepusa\stage\KY
    
    11/05/2014  07:52 PM             1,687 KY2.gif
                   1 File(s)          1,687 bytes
                   0 Dir(s)  423,609,860,096 bytes free
    Mtime: 1415235120
    As string: Wed Nov  5 19:52:00 2014
    
    The date of the 1st file is correct. The date on the 2nd file should be 11/4 at 5:03 instead of the same date as the 1st file. I've entered the twilight zone.

      I don't know whatever makes you think that the date on the second file should be different. Your OS concurs with Perl that the date of the file on the filesystem is as shown and identical to the first date.

      Maybe you want to tell us where you get that other date of "11/4" (whatever the month and the day should be in that) from? What program shows that date?

      If you want to use a different timestamp than the mtime, you have to actually use that instead of using the mtime from the filesystem.

        The 2 files are in different directories as you can see. The 2nd file in the stage directory has an external (what I can see looking at the file list in the directory of the 2nd file) dt stamp of 11/4 at 5:03.