Jump to content

About the attrib command on cleaup.cmd


gugutz

Recommended Posts

I openned command prompt, and typed attrib /?.

so the list of all possibilities of what to do with the command appeared.

and it says there that if you add, for instance, attrib -r /s "%programfiles%\Alwil Software\Avast4", it will remove the Read Only tag from all the files and subdirectories and the files under subdirectories under Avast4 folder.

But i´m testing, i it doesn´t work! How come?

i created a line in my cleanup.cmd files using that exact line i described above, but when i go and check, the Avast4 folder still contains Read-Only files.

Do i really have to insert attrib -r *.* specifying folder by folder from where i want to remove the Read-Only tag?

Or i am doing something wrong?

I want to use this to remove the Read-Only tag from firefox profiles folder, and it have many subdirectories, so only 1 line to do the whole work would be very handy.

Any corrections, sugestions or ideas?

Since now, thanks for all the ones who helps!

Link to comment
Share on other sites


attrib -r "%programfiles%\Alwil Software\Avast4" /s /d

Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [drive:][path][filename]
[/S [/D]]

+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
[drive:][path][filename]
Specifies a file or files for attrib to process.
/S Processes matching files in the current folder
and all subfolders.
/D Processes folders as well.

Edited by Ctrl-X
Link to comment
Share on other sites

attrib -r "%programfiles%\Alwil Software\Avast4" /s

didn´t work.

i went to check, and was there, all the files under avast4 folder set as read-only.

:(

It wasn't supposed to!

I was 'tongue in cheek' highlighting the fact that even though you'd read up and were having problems, you'd decided against using the /s switch after the drive path and filename as in this text

ATTRIB [+R | -R][+A | -A ] [+S | -S] [+H | -H] [drive:][path][filename] [/s [/D]]
As already now given by other members, you have two options
  1. attrib -r "%programfiles%\Alwil Software\Avast4\*.*" /s
    This will set the attributes of all files inside Avast4 to NOT 'read only'
  2. attrib -r "%programfiles%\Alwil Software\Avast4\*" /s /d
    This will set the attributes of all files and directories inside Avast4 to NOT 'read-only'

Edited by Yzöwl
Link to comment
Share on other sites

problem solved.

i wan´t aware of the \*" at the end of the line.

this means ALL, right?

i tested, and all the files and subdirectories under Avast4 folder had the read only tag removed.

thanks, guys!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...