Results 1 to 5 of 5

Thread: File attributes

  1. #1
    3 Star Lounger
    Join Date
    Apr 2001
    Posts
    304
    Thanks
    0
    Thanked 0 Times in 0 Posts

    File attributes

    I'm relatively positive that file attributes are copied when a file is copied. For example, if I copy a read only file, the new file will be read only also. But, in effort to "prove" this fact to someone, does anyone know where I can locate a white paper on the subject. Thanks in advance. - Sat

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: File attributes

    If "Attributes" includes access rights then what happens depends on the file system (NTFS or FAT) of the source and destination, whether the file is being copied or moved and whether the destination is on the same partition as the source or a different one.

    The Read Only attribute is preserved on copied files, that is why copying files from a CD always leaves the Read Only attribute set.

    I don't have a pointer to a definitive reference for you.

    StuartR

  3. #3
    3 Star Lounger
    Join Date
    Apr 2001
    Posts
    304
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File attributes

    You mentioned that it depends on whether the file was copied or moved. What would be the difference.

    Any by attributes, yes, I'm referring to the Read Only setting, etc.

  4. #4
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: File attributes

    It should be pretty easy to test.

    File attributes such as Archived, Hidden, System or Read Only are maintained wherever possible.
    (Copying a file to CD will always set the Read Only bit for example)

    A file that is moved to another place on the same partition retains its current attributes.
    A file that is moved to another partition, or copied to the same partition gets any default permissions specified for the target folder.

    StuartR

  5. #5
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: File attributes

    Here's an article explaining how XXCOPY handles attributes which might assist you.
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

Posting Permissions

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