Job Management Partner 1/Software Distribution Automatic Installation Tool Description and Reference

[Contents][Glossary][Index][Back][Next]

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 may return if the function has not been executed normally.

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