in reply to Preserving "last modified" time stamp when copying files with File::Copy

"Good" ways of copying files preserve the "last modified" time of both the original file and the copy (well, it'd have to be a particularly bad form of copying to modify the "last modified" time of the original, eh?). I suggest you test File::Copy to verify that it does this in your specific configuration.

One problem under Windows is that different file systems have different resolutions for their file time stamps (or, that is my guess at the source of the problem). This can mean that the two files end up with slightly different time stamps. I haven't investigated this fully but did put an "off by one (minute)" hack into some code I wrote that compared file modification times in Windows. ):

        - tye (but my friends call me "Tye")
  • Comment on (tye)Re: Preserving "last modified" time stamp when copying files with File::Copy

Replies are listed 'Best First'.
Re: (tye)Re: Preserving "last modified" time stamp when copying files with File::Copy
by dfog (Scribe) on Mar 15, 2001 at 22:02 UTC
    Thanks. There is no problem with the system, as I haven't quite finished writing it yet. The question is more of a preventive measure. All the systems were configured at the same time, with the same software, and as far as I know, the same hardware. Because of this, the resolution shouldn't be a problem. (Of course, you never know with Windows). This just seems the easiest, least load intensive way to compare the two files, though if anyone has any other ways of checking that are more exact and about the same load, I would love to hear them.
    Dave