CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2000
    Location
    Germany, Bavaria
    Posts
    30

    Remove write protection

    Hi,

    i need to remove write protection from about 14.000 files in a folder including the subfolders. Could anyone show me an easy and fast way to do this. I couldn´t figure it out myself.
    Thanks in advance.

    cu
    Fraggle


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Remove write protection

    Try to set Archive attrib
    SetAttr "YOURFILE", vbArchive

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Remove write protection

    Good, Iouri. I am only sad I am already out of votes for today...

    Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  4. #4
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Remove write protection

    This will turn off the ReadOnly attribute of a file

    private Sub Command2_Click()
    Dim fn as string
    fn = "C:\Junk.txt"
    SetAttr fn, GetAttr(fn) And (&HFF - vbReadOnly)
    End Sub




    John G

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