Re: Create read-only file using c++
Quote:
Originally Posted by
neoraghav
thank you very much......your suggesstion has solved my problem as of now .......
How?
Re: Create read-only file using c++
Quote:
Originally Posted by
GCDEF
How?
bcoz......other concepts are not getting into my mind.......
so ill go with just changing the attribute flag ......as needed....
Re: Create read-only file using c++
Quote:
Originally Posted by
neoraghav
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.
Re: Create read-only file using c++
Quote:
Originally Posted by
GCDEF
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.
Re: Create read-only file using c++
Quote:
Originally Posted by
Ankheg
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.........
Re: Create read-only file using c++
Quote:
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.
Quote:
but is it possible to prevent the file from deletion.........
No.
Re: Create read-only file using c++
Quote:
Originally Posted by
Skizmo
This is no solution. This is just setting the read-only marker. Every dumbass can remove it.
No.
do you have a solution.......!!
Re: Create read-only file using c++
Quote:
Originally Posted by
neoraghav
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.