1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

attrib -C on a read only file?

Discussion in 'Support' started by Rodolfo, Nov 14, 2012.

  1. Rodolfo

    Joined:
    May 20, 2009
    Messages:
    213
    Likes Received:
    0
    I would like to know if it is possible to change the C attribute on a read only file, without changing anything else.
    I tried on two test files on two different systems.
    On the first, I did not get any error but the attributes were not changed.
    On the second, I go an error.

    Code:
    [F:\work\test]attrib
    R__A______C____  F:\work\test\a.txt
    
    [F:\work\test]attrib -c a.txt
    R__A______C____ -> R__A___________  F:\work\test\a.txt
    TCC: (Sys) The handle is invalid.
    "F:\work\test\a.txt"
    
    Thank You and regards

    Rodolfo Giovanninetti
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,860
    Likes Received:
    83
    That's a Windows (API) issue, not TCC. But it does make sense if Windows doesn't let you compress/uncompress read-only files.
     

Share This Page