From: Ned Konz Date: 2002-04-23T00:53:24+09:00 Subject: Re: Modified date due to File.copy Michael Kircher wrote: > I am developing an application where I have to rely on the > date of files. If I do copy files, I expect to have the "last modified > date" to stay the same on the copy. > Is there any way to avoid this? The call to system ("copy", ...) > did not succeed but returned false - is that supposed to work? $ ri utime ------------------------------------------------------------ File::utime File.utime( anAccessTime, aModTime [, fileName]+> ) -> aFixnum ------------------------------------------------------------------------ Changes the access and modification times on a number of files. The times must be instances of class Time or integers representing the number of seconds since epoch. Returns the number of files processed. Not available on all platforms. File.utime(0, 0, "testfile") #=> 1 File.mtime("testfile") #=> Wed Dec 31 18:00:00 CST 1969 File.utime(0, Time.now, "testfile") #=> 1 File.mtime("testfile") #=> Sun Mar 04 23:28:25 CST 2001