Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 1007 Bytes

SetFileAttributes.md

File metadata and controls

55 lines (37 loc) · 1007 Bytes

Home

Function name : SetFileAttributes

Group: File Management - Library: kernel32


Sets a file"s attributes.


Code examples:

Changing file attributes

Declaration:

BOOL SetFileAttributes(
  LPCTSTR lpFileName,      // file name
  DWORD dwFileAttributes   // attributes
);  

FoxPro declaration:

DECLARE SHORT SetFileAttributes IN kernel32;
	STRING lpFileName,;
	INTEGER dwFileAttributes  

Parameters:

lpFileName [in] Pointer to a string that specifies the name of the file whose attributes are to be set.

dwFileAttributes [in] Specifies the file attributes to set for the file.


Return value:

If the function succeeds, the return value is nonzero.


Comments:

DOS command ATTRIB can be used for the same purpose:

ATTRIB -R c:\mydir\*.* /S