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

6,522

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

Share:
6,522

Related videos on Youtube

Kenster
Author by

Kenster

Software developer in central Ohio. Currently developing a content management system in Java and JBPM on Linux. I've previously worked with Solaris, Oracle, JDBC, C, C++, Perl, and shell scripting.

Updated on September 18, 2022

Comments

  • Kenster
    Kenster over 1 year

    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?

    • Admin
      Admin about 13 years
      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.
    • Admin
      Admin about 13 years
      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.
  • Admin
    Admin about 13 years
    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..
  • Admin
    Admin about 13 years
    You don't need <> and use "C:\path\to\your game" if it has space in it
  • Admin
    Admin about 13 years
    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"
  • Gaff
    Gaff about 13 years
    Can you paste here the exact command you are entering now?
  • iglvzx
    iglvzx almost 12 years
    Creative 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.