CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Create read-only file using c++

    Quote Originally Posted by neoraghav View Post
    thank you very much......your suggesstion has solved my problem as of now .......
    How?

  2. #17
    Join Date
    Sep 2010
    Posts
    15

    Re: Create read-only file using c++

    Quote Originally Posted by GCDEF View Post
    How?
    bcoz......other concepts are not getting into my mind.......

    so ill go with just changing the attribute flag ......as needed....

  3. #18
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Create read-only file using c++

    Quote Originally Posted by neoraghav View Post
    bcoz......other concepts are not getting into my mind.......

    so ill go with just changing the attribute flag ......as needed....
    The fact that you don't understand the solution doesn't change the fact that just changing the attributes does nothing to solve your problem.

  4. #19
    Join Date
    Aug 2010
    Posts
    47

    Re: Create read-only file using c++

    Quote Originally Posted by GCDEF View Post
    The fact that you don't understand the solution doesn't change the fact that just changing the attributes does nothing to solve your problem.
    I suppose if he just needs it to prevent accidental deletion, it solves his problem. He never really explained why he needed it read only. If it's part of a homework assignment for example, it might be enough that he did it. If it's a pointy-haired boss making random demands, then again it might be enough. If he has a real need for security... not so much.

  5. #20
    Join Date
    Sep 2010
    Posts
    15

    Re: Create read-only file using c++

    Quote Originally Posted by Ankheg View Post
    I suppose if he just needs it to prevent accidental deletion, it solves his problem. He never really explained why he needed it read only. If it's part of a homework assignment for example, it might be enough that he did it. If it's a pointy-haired boss making random demands, then again it might be enough. If he has a real need for security... not so much.
    it solves my problem. i made it read only using
    Code:
    system("attrib -r logfileBrandNew.log");
    system("attrib +r logfileBrandNew.log");
    i know how to hide the file.
    but is it possible to prevent the file from deletion.........

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

    Re: Create read-only file using c++

    it solves my problem. i made it read only using
    This is no solution. This is just setting the read-only marker. Every dumbass can remove it.

    but is it possible to prevent the file from deletion.........
    No.

  7. #22
    Join Date
    Sep 2010
    Posts
    15

    Re: Create read-only file using c++

    Quote Originally Posted by Skizmo View Post
    This is no solution. This is just setting the read-only marker. Every dumbass can remove it.


    No.
    do you have a solution.......!!

  8. #23
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Create read-only file using c++

    Quote Originally Posted by neoraghav View Post
    do you have a solution.......!!
    You can't have a solution until you have clearly defined requirements, which you have yet to provide. We don't know how secure this needs to be.

Page 2 of 2 FirstFirst 12

Tags for this Thread

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