MSFN Forum: About the attrib command on cleaup.cmd - MSFN Forum

Jump to content



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

About the attrib command on cleaup.cmd Isnt working with all subfiles and subfolders at all! Rate Topic: -----

#1 User is offline   gugutz 

  • Member
  • PipPip
  • Group: Members
  • Posts: 174
  • Joined: 16-September 06

Posted 25 September 2006 - 12:01 PM

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!


#2 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 25 September 2006 - 12:17 PM

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


#3 User is offline   gugutz 

  • Member
  • PipPip
  • Group: Members
  • Posts: 174
  • Joined: 16-September 06

Posted 25 September 2006 - 12:25 PM

View PostYzöwl, on Sep 25 2006, 03:17 PM, said:

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.
:(

#4 User is offline   nakira 

  • Member
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 18-July 04

Posted 25 September 2006 - 01:02 PM

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


#5 User is offline   Ctrl-X 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 444
  • Joined: 29-August 06

Posted 25 September 2006 - 01:44 PM

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.

This post has been edited by Ctrl-X: 25 September 2006 - 01:45 PM


#6 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 25 September 2006 - 02:33 PM

View Postgugutz, on Sep 25 2006, 07:25 PM, said:

View PostYzöwl, on Sep 25 2006, 03:17 PM, said:

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

Quote

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
  • attrib -r "%programfiles%\Alwil Software\Avast4\*.*" /s
    This will set the attributes of all files inside Avast4 to NOT 'read only'
  • attrib -r "%programfiles%\Alwil Software\Avast4\*" /s /d
    This will set the attributes of all files and directories inside Avast4 to NOT 'read-only'

This post has been edited by Yzöwl: 25 September 2006 - 03:14 PM


#7 User is offline   gugutz 

  • Member
  • PipPip
  • Group: Members
  • Posts: 174
  • Joined: 16-September 06

Posted 25 September 2006 - 09:21 PM

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!

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