Announcement

Collapse
No announcement yet.

Maintain File Date/Time info with fscopy or fsrename

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Maintain File Date/Time info with fscopy or fsrename

    Hello,

    It looks like fscopy and fsrename changes the original file date/time information. Is there any way to maintain the files original date/time? Both the modified and created date/time are changed to the date/time the function executes.

    Thanks,
    -mike

  • #2
    fscopy should leave the original file unchanged, but the copy with its new date/time.
    fsrename should change the date/time to reflect its new creation time.
    At least I think thats the case...
    William Gilligan - Orange Marmalade, Inc.
    www.OrangeMarmaladeinc.com

    Comment


    • #3
      Hey Bill,

      Glad to see you are still around! Mike here from the late 1990's early 2000's era... (we've sure gotten old!)

      Never had to worry about it until now. But govt agency has decided to make file names 70 characters with 90% cryptic nonsense. I fcopy original file to 2 locations and then move original file via frename and all files date/time are replaced with execution date/time. Even the created date/time is replaced.

      I guess I can grab last modified using ftime and either adding it to the file name or adding it to the copied file using ftouch.

      Hope all is well... thanks for the reply.

      -mike

      Comment


      • #4
        Old? who me? :-)
        I think the problem is the frename. When you do that, its like recreating the file.
        I did a quick google and found this - it might help..
        http://unix.stackexchange.com/questi...o-another-file
        Notice the part about giving one file the date time of another....
        I'm using merge cap to create a merge pcap file from 15 files. For the merged file, I have changed the name to that of the first of the 15 files. But I would also like to change the merged file's
        William Gilligan - Orange Marmalade, Inc.
        www.OrangeMarmaladeinc.com

        Comment

        Working...
        X