Windows – attrib -s-r C:\/d/s Just wont work

command linefile-attributespathwindows

I'm trying to change a file within a game I have installed on my computer, but the read only attribute won't change. I've researched this and found a way using the Command Prompt where I can change the attributes of the files; specifically the read only attribute.

The command I was given is:

attrib -s-r C:\<folder path>/d/s

Thus I opened a Command Prompt and typed in:

attrib-r-s<C:/The Creative Assembly>/d/s

Each time the result is: "The filename, directory name, or volume label syntax is incorrect."

I've tried copying and pasting the file path, or typing it manually, but it still won't work. I can't seem to work out what's wrong. Any ideas?

Best Answer

Make sure you are:

  • including spaces in the command as outlined below
  • not using < > in the pathname (< > is usually a convention meaning you have to substitute something for <whatever is included>)
  • are under an admin account or running cmd.exe as administrator
  • using blackslashes \ not forward slashes / in the pathname

attrib -r -s C:\The Creative Assembly /d /s

If that fails, try:

attrib -r -h -s "C:\The Creative Assembly" /d /s

Related Question