CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2011
    Posts
    25

    What file properties change when a file is copied?

    At the moment I am only looking at exe files and text files. So far I have:

    1. File name (different if in the same path)
    2. File path (although this does not always change)
    3. File date created
    4. If the Read only file attribute was checked on the original, it falls off during the copy process
    5. If the file is checked as "Compress contents to save disk space" on the original, it falls off during the copy process.
    6. When a file is copied it is always checked as ready for archiving on the copy regardless of the original.
    7. When a file is copied it is always checked as "Allow this file to have contents indexed in addition to file properties" on the copy regardless of the original.

    *1 As file date last accessed is not updated by windows 7 by default, it is therefore omitted.
    *2 file date modified is not altered when a file is copied and is therefore omitted.

    Have I missed any?
    Last edited by Witis; December 2nd, 2011 at 10:26 PM. Reason: Updated as per Eri523's post

  2. #2
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: What file properties change when a file is copied?

    The archive attribute of the copy will be set, regardless of its status on the original.

    Also, you have one on your list that actually does not get changed: The modification date is copied along with the file. This may lead to the copy having a modification date that lies before its creation date.
    Last edited by Eri523; December 2nd, 2011 at 11:36 PM. Reason: Minor refinement
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  3. #3
    Join Date
    Jan 2011
    Posts
    25

    Re: What file properties change when a file is copied?

    You are correct Eri523, I did not notice that about the archive attribute and the date modified, I have updated my first post to reflect your comments, and added some additional properties which change similarly to the archive attribute when copied.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured