AIT_ChangeFileAttribute

Description

Changes the attribute of the specified file or directory.

Format

bool AIT_ChangeFileAttribute  (
 string strFileName,     // Filename
 integer nFileAttributes // File attribute
);

Parameters

strFileName (input)

Specify a filename. You can also specify a directory.

nFileAttributes (input)

Specify a new attribute. For the values you can use for input, see AIT_FileExists.

Return values

The return value is true if the function was executed normally, and false if not. If the function has returned false, use AIT_GetLastError to acquire an extended error code.

The following gives the error codes that AIT_GetLastError might return if the function has not been executed normally:

Extended error numberError code
2ERROR_FILE_NOT_FOUND
3ERROR_PATH_NOT_FOUND
8ERROR_NOT_ENOUGH_MEMORY
14ERROR_OUTOFMEMORY
18ERROR_NO_MORE_FILES
21ERROR_NOT_READY
53ERROR_BAD_NETPATH
87ERROR_INVALID_PARAMETER
123ERROR_INVALID_NAME
148ERROR_PATH_BUSY
161ERROR_BAD_PATHNAME
183ERROR_ALREADY_EXISTS
206ERROR_FILENAME_EXCED_RANGE
1005ERROR_UNRECOGNIZED_VOLUME
1210ERROR_INVALID_COMPUTERNAME
1214ERROR_INVALID_NETNAME
1231ERROR_NETWORK_UNREACHABLE
1392ERROR_FILE_CORRUPT