Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want a source program to hide a any kind of file using c.
Posted
Comments
Wendelius 26-Mar-11 5:09am    
Does hiding mean the same as changing the file's attributes (hidden)?

1 solution

You can do by using DOS command like this
System("attrib fileName +s +h");


Or by calling SetFileAttributes and setting the FILE_ATTRIBUTE_HIDDEN flag. See http://msdn.microsoft.com/en-us/library/aa365535%28VS.85%29.aspx
 
Share this answer
 
v3
Comments
Аslam Iqbal 26-Mar-11 5:56am    
perfect solution. my 5
CPallini 26-Mar-11 6:47am    
5.As side note, is 'system', not 'System'.

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