User Tools

Site Tools


change_fileattributes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

change_fileattributes [2008/06/09 12:37] (current)
Line 1: Line 1:
 +====== Change file attributes ======
 +
 +<​file>​This code snippet is originally from the former WinAPI site www.winapi.net</​file>​
 +
 +Sometimes you need to change the file attributes, e.g. if you want to delete a write-protected file. This function solves this problem:
 +
 +<code c>#​include <​windows.h>​
 +
 +SetFileAttributes (TEXT("​C:​\\filename.txt"​),​ FILE_ATTRIBUTE_NORMAL);</​code>​
 +
 +The possible attributes can be found in the [[http://​msdn.microsoft.com/​en-us/​library/​ms891925.aspx|MSDN]].
  
change_fileattributes.txt ยท Last modified: 2008/06/09 12:37 by christian