CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2009
    Posts
    33

    Question files disappearing

    In another post, a member mentioned that to do a SetFileAttributes() without
    clearing the rest of the attributes... that I could do this:

    SetFileAttributes (filename, GetFileAttributes(filename)&~FILE_ATTRIBUTE_READONLY);

    evidently it is the '~' that makes the difference here.

    Removing the ~ mark will set whatever attribute I need to ON, however it will reset the others to OFF...

    Adding the ~ mark however.... seemingly makes the file disappear from time itself, but it still exist in a parallel dimension because a "dir /all" shows it still there... but it is missing from explorer..(no its not hidden either)...missing from a regular "dir"....missing from file searches ect...

    My questions are these:

    1. Why are these files disappearing, and how do I a) get them back or b) remove them?

    2. Since this way is obviously inadequate, how might one set attributes without resetting all the others?

    Regards,

    - Mac

  2. #2
    Join Date
    Jul 2009
    Posts
    33

    Re: files disappearing

    nevermind, figured it out

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