FUNCTION REFERENCE

fileattrib

Get or set file and folder attributes.

Get or set file and folder attributes.

Syntax

[status, values, msgid] = fileattrib(name)

Syntax

[status, msg, msgid] = fileattrib(name, attribs, users)

values has Name, archive, system, hidden, directory and the User, Group and Other read/write/execute fields; name may end in a wildcard (a struct array). With no outputs and no attribs, the attributes are displayed; bare fileattrib queries the current folder. attribs such as '+w' or '-h' set or clear attributes: a, h, s, w on Windows, r, w, x (users u, g, o, a) elsewhere. With outputs, failures return status 0 and a message instead of an error.

Example

s=fileattrib(pwd)   % 1

Differences from MATLAB: The recursive 's' option is not supported yet.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.