====== Change file attributes ======
This code snippet is originally from the former WinAPI site www.winapi.net
Sometimes you need to change the file attributes, e.g. if you want to delete a write-protected file. This function solves this problem:
#include
SetFileAttributes (TEXT("C:\\filename.txt"), FILE_ATTRIBUTE_NORMAL);
The possible attributes can be found in the [[http://msdn.microsoft.com/en-us/library/ms891925.aspx|MSDN]].