CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2008
    Posts
    21

    How to remove file's written protection

    Hey guys,
    I am using some other people's cpp file which has written protection (a little lock's icon). Just wondering how I should change that so I can modify the file. I did not see an option in file's property page...
    Thank you so much.

  2. #2
    Join Date
    Feb 2002
    Posts
    3,788

    Re: How to remove file's written protection

    SetFileAttributes

  3. #3
    Join Date
    Sep 2008
    Posts
    21

    Re: How to remove file's written protection

    ...and where should I set the file attributes in vs2005?
    Thank you.

  4. #4
    Join Date
    Feb 2002
    Posts
    3,788

    Re: How to remove file's written protection

    well, you could write a small routine to remove the "read-only" attribute from all the files you need to modify.

  5. #5
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: How to remove file's written protection

    I did not see an option in file's property page...
    open a dos-box (run->cmd) go to the directory where the file is and type 'attrib -r *.*'. This removes the read-only flag from all the files in the directory.

  6. #6
    Join Date
    Sep 2008
    Posts
    21

    Re: How to remove file's written protection

    Quote Originally Posted by Skizmo View Post
    open a dos-box (run->cmd) go to the directory where the file is and type 'attrib -r *.*'. This removes the read-only flag from all the files in the directory.
    It worked! Thank you so much

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