UnixServerAdmin

Server Administration & Management

How to Change File Attributes with Attrib from the Windows Command line (CLI) Prompt

Just run command prompt
Start -> Run -> CMD for XP, or
for Vista, Se7en & 10 Start -> type CMD in search box, right click and run as Admin,
type the following command:

attrib -H -S C:\path\to\your\file.doc /S /D

You can also use the asterisk character to define multiple extensions. For example:

attrib -H -S C:\raymond\*.* /S /D

This would remove the Hidden and System attribute of all files in the raymond folder on the C drive.

The /S and /D arguments are optional.

Just to point out, it’s probably not the best idea to use something like “C:\*.*” as this will unhide the whole drive including files which Windows has set as hidden or system by design.

R – This command will assign the “Read-Only” attribute to your selected files or folders.
H – This command will assign the “Hidden” attribute to your selected files or folders.
A – This command will prepare your selected files or folders for “Archiving.”
S – This command will change your selected files or folders by assigning the “System” attribute.
/S – This command will recurse down into all sub folders
/D – This command will unhide the folders themselves if they have the System or Hidden attribute set.

Advertisements

May 14, 2018 - Posted by | Uncategorized

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: