File Time comparison

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sadanand
    New Member
    • May 2007
    • 6

    File Time comparison

    Hi,
    i have two files which are created at x and y time (date,Day,time) .
    I want to compare the time of each file and pick the latest file.

    How can I do that?

    thanks in advance.

    Sada
  • miller
    Recognized Expert Top Contributor
    • Oct 2006
    • 1086

    #2
    Simply use one of the standard file test functions to determine the time of each file and then compare them.

    perldoc -X
    perldoc stat

    - Miller

    Comment

    • sadanand
      New Member
      • May 2007
      • 6

      #3
      Thnaks Miller,

      I am able to get the time of two files.
      But I am not able to compare the times.

      Comment

      • miller
        Recognized Expert Top Contributor
        • Oct 2006
        • 1086

        #4
        What are you doing thus far? I won't be able to advise you without knowing what code you are using to determine the file date/time and the format of that date.

        - Miller

        Comment

        Working...