MSFN Forum: ATTRIB.cmd - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

ATTRIB.cmd Removing attributes by script Rate Topic: -----

#1 User is offline   MAVERICKS CHOICE 

  • The Guy from Aus
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,615
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

  Posted 14 April 2007 - 06:22 PM

Is it possible to remove all attributes to all dir, sub dir, folders, files, live in windows?

using the cmd as follows:

ATTRIB -R -H %systemdrive% /S /D

All examples are welcomed.


#2 User is offline   [deXter] 

  • The Lord of the Scripts
  • PipPipPip
  • Group: Members
  • Posts: 308
  • Joined: 08-May 04

Posted 15 April 2007 - 02:34 AM

Simply put, yes, you can.

There is a caveat though: You won't be able to remove the attributes (R/H/A) of a system file (+S). For such files, you'd need to do a -S first.

ATTRIB -S -R -H -A will work if you want to remove all attributes.

Further caveats-
- It won't work for OS protected files like "System Volume Information"
- It won't work for files that you don't have write access to. (use cacls.exe for such files)

#3 User is offline   MAVERICKS CHOICE 

  • The Guy from Aus
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,615
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

  Posted 15 April 2007 - 02:05 PM

View Post[deXter], on Apr 15 2007, 06:34 PM, said:

Simply put, yes, you can.

There is a caveat though: You won't be able to remove the attributes (R/H/A) of a system file (+S). For such files, you'd need to do a -S first.

ATTRIB -S -R -H -A will work if you want to remove all attributes.

Further caveats-
- It won't work for OS protected files like "System Volume Information"
- It won't work for files that you don't have write access to. (use cacls.exe for such files)


@ deXter
very helpful

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy