Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
2.75/5 (4 votes)
See more:
Hai.
I have a XML file. I need to save the file from removing..
Even if the program is not running. Is this possible?
Posted

So you just want to forbid anyone to move or delete your file? It's not that easy actually. You see, there's always a way to remove your file, it's only a matter of efforts required :). You can mark your file as hidden, system and readonly (just by setting file attributes), but those files may be discovered anyway. You can set access rights on NTFS, restricting users' access to your files, but there are always users with administrator rights. Finally, you can create service that will block file in question while working... but it would make your work with that file a bit harder, and almost any service can be stopped by user
 
Share this answer
 
Give permission so users can't delete it and only admins can do.
 
Share this answer
 
Comments
version_2.0 6-Jun-11 2:51am    
How do I do this...? plz help..
JustWorking 6-Jun-11 4:33am    
Set its properties to "Read Only"
JustWorking 6-Jun-11 5:00am    
PS: If it works for you click on Accept Solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900