attrib -s-r C:\<folder path>/d/s Just wont work?

1

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?

Ryan Connolly

Posted 2011-04-24T19:59:32.817

Reputation:

You're trying to modify ONE file only? Why not use windows explorer, right-click on file, properties, un-check Read-only checkbox, click OK. – None – 2011-04-24T20:12:48.250

every time i un-check the read-only checkbox and apply it just checks it again, that was my original problem. Done some research and this is the solution i found that seemed like it should work, but it just doesn't want to. – None – 2011-04-24T20:16:53.203

Answers

1

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

LawrenceC

Posted 2011-04-24T19:59:32.817

Reputation: 63 487

1Creative and Assembly are not valid arguments. ;) Since the path has spaces in it, you need to escape them individually or wrap the whole path with double quotes. – iglvzx – 2012-05-19T22:55:46.313

0

First, get the exact path where you want to apply this to. You don't want to do it on C:\ and screw up everything.

The command should be something like this:

attrib -s -r C:\path\to\your\game /d /s

Where:

  • /d - processes folders
  • /s - processes files in all directories

manojlds

Posted 2011-04-24T19:59:32.817

Reputation: 2 068

so even just the next file in?

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

does it need proper spacing and what about the < > round the file path? is that needed?

First time of me using this.. – None – 2011-04-24T20:07:39.157

You don't need <> and use "C:\path\to\your game" if it has space in it – None – 2011-04-24T20:10:12.167

i'm doing everything the way its meant to be, its working properly and i'm copy and pasting the file path to make sure i don't make a mistake and its telling me that "the system connot find the file specified" – None – 2011-04-24T20:15:02.873

1Can you paste here the exact command you are entering now? – Gaff – 2011-04-25T04:30:27.007