Monday, January 12, 2015

ATTRIB Command.

File attributes are settings associated with files that allow or deny certain rights to how a user or the operating system can access that file or folder.

How to adjust the attributes using ATTRIB command in windows.

ATTRIB is used Display or change file attributes in windows.

Syntax
ATTRIB <attribute> <File/directory path>

Attributes :-
+ : Attribute ON (Add attribute)
- : Attribute OFF (Remove attribute)
R : Read-only file attribute.
A : Archive file attribute.
S : System file attribute.
H : Hidden file attribute.
I : Not content indexed file attribute
X : No scrub file attribute.
V : Integrity attribute.
/S : Include all sub-folders.
/D : Include folders as well.
/L : Work on the attributes of the Sym the target of the Symbolic Link

Some other extended attributes :-
E : Encrypted
C : Compressed (128:read-only)
L : Symbolic link/Junction (64:read-only)
N : Normal (0: cannot be used for file selection)
O : Offline
P : Sparse file
T : Temporary

Viewing archive attributes

The Archive attribute (A) is used to identify files that are new or has been modified recently.

Example :-
C:\Users\lmntechnohub\Documents>attrib
A            C:\Users\lmntechnohub\Documents\chat marry.txt
A   H        C:\Users\lmntechnohub\Documents\Default.rdp
A  SH        C:\Users\lmntechnohub\Documents\desktop.ini
A            C:\Users\lmntechnohub\Documents\ip.log
A            C:\Users\lmntechnohub\Documents\Presentation1.ppt
A            C:\Users\lmntechnohub\Documents\win 7.ova



Hide a file :-
Example :-
C:\>attrib +h c:/Users\lmntechnohub\Documents\2015.txt

Unhide a file :-
Example :-
C:\>attrib -h c:/Users\lmntechnohub\Documents\2015.txt

Remove a system file attribute
Example :-
C:\>attrib -h c:/Users\lmntechnohub\Documents\2015.txt

Unhide all files and folder present in a directory and its sub-folders.
Example:-
C:\>attrib -h /s /d *.*

ENJOY! and stay connected.

0 comments :

Post a Comment