Internet Explorer is no longer supported. Many things will still work, but your experience will be degraded and some things won't function. Please use a modern browser such as Edge, Chrome, or Firefox.

Set-FileAttributes

Sets or clears attributes on matching files.

Script usage:

Set-FileAttributes(
	[Directory: <text>],
	[Include: <@(text)>],
	[Exclude: <@(text)>],
	[ReadOnly: <true/false>],
	[Hidden: <true/false>],
	[System: <true/false>],
	[Verbose: <true/false>]
);

This operation may be prefixed with Files::, although this is a built-in namespace and isn't really necessary.

Arguments:

NameFormatScript UsageUsage Notes
Directory
text
Directory
Include
@(text)
Include
See KB#1119 to learn more about masking syntax.
Exclude
@(text)
Exclude
See KB#1119 to learn more about masking syntax.
Read only
true/false
ReadOnly
Hidden
true/false
Hidden
System
true/false
System
Verbose
true/false
Verbose