cath
asked on
attrib syntax...
Hi.
Not sure if this is the right place to ask a DOS question, but here goes...
I'm trying to recursively change the file properties in a directory (it came off a CD-ROM so all the files are 'read-only' in a directory tree). I'm trying this but it ain't working -
ATTRIB [-R] [[C:\][MYDOCU~1\DECCA\DOCR OOT\]] [/S]
I'm getting the error
'Parameter value not allowed - [-R]
the directory is C:\MYDOCUMENTS\DECCA\DOCRO OT\ and I want to change the properties of all files within that and nested directories...
The machine is running Win98 if that matters...
anyone any ideas?
Ian
Not sure if this is the right place to ask a DOS question, but here goes...
I'm trying to recursively change the file properties in a directory (it came off a CD-ROM so all the files are 'read-only' in a directory tree). I'm trying this but it ain't working -
ATTRIB [-R] [[C:\][MYDOCU~1\DECCA\DOCR
I'm getting the error
'Parameter value not allowed - [-R]
the directory is C:\MYDOCUMENTS\DECCA\DOCRO
The machine is running Win98 if that matters...
anyone any ideas?
Ian
By the way. A hint on syntax. When you see the documentation give parameters in [] like:
ATTRIB [-R]...
It means that the parameter is OPTIONAL. So you can leave it out if it's not necessary. The ATTRIB command for example says:
ATTRIB [+R | -R] ...
That means that you can have:
ATTRIB
ATTRIB +R
ATTRIB -R
and all are legal syntax. Note that this command does not require ANY parameters so you can issue:
ATTRIB
This will just display the settings for all the files in the current directory.
ATTRIB [-R]...
It means that the parameter is OPTIONAL. So you can leave it out if it's not necessary. The ATTRIB command for example says:
ATTRIB [+R | -R] ...
That means that you can have:
ATTRIB
ATTRIB +R
ATTRIB -R
and all are legal syntax. Note that this command does not require ANY parameters so you can issue:
ATTRIB
This will just display the settings for all the files in the current directory.
ASKER
I'm getting 'path not found' when I do this:
ATTRIB -R C:\MYDOCU~1\DECCA\DOCROOT\ /s
and yet the path (unshortedned to 8.3) is
c:\my documents\decca\docroot\
yet if I put that into the ATTRIB string (ie include the space after 'my' and the full string for 'documents') I get 'parameter value not allowed' - I guess cause it doesn't like the space.
any ideas?
DOS, God love it, huh?
Ian
ATTRIB -R C:\MYDOCU~1\DECCA\DOCROOT\
and yet the path (unshortedned to 8.3) is
c:\my documents\decca\docroot\
yet if I put that into the ATTRIB string (ie include the space after 'my' and the full string for 'documents') I get 'parameter value not allowed' - I guess cause it doesn't like the space.
any ideas?
DOS, God love it, huh?
Ian
Then try it like:
ATTRIB -R "c:\my documents\decca\docroot" /s
ATTRIB -R "c:\my documents\decca\docroot" /s
ASKER
nope, says 'File not found - c:\my documents\decca\docroot
I tried it with a trailing \ as well (ie ..\docroot\)
and got path not found...
annoying...
any ideas?
Ian
I tried it with a trailing \ as well (ie ..\docroot\)
and got path not found...
annoying...
any ideas?
Ian
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
well I can't see a filename extension on the end of the directory...
I do DIR /P
and I get a list of directories of which one is
MYDOCU~1
so then I try
ATTRIB -R "C:\MYDOCU~1\DECCA\DOCROOT " /s
and then I try
ATTRIB -R "C:\MY DOCUMENTS\DECCA\DOCROOT" /s
and neither works. Both times I get 'File not found...'
I mean what _is_ it with DOS? This is so easy in Linux...
I appreciate your help, though... ;-)
Ian
I do DIR /P
and I get a list of directories of which one is
MYDOCU~1
so then I try
ATTRIB -R "C:\MYDOCU~1\DECCA\DOCROOT
and then I try
ATTRIB -R "C:\MY DOCUMENTS\DECCA\DOCROOT" /s
and neither works. Both times I get 'File not found...'
I mean what _is_ it with DOS? This is so easy in Linux...
I appreciate your help, though... ;-)
Ian
OK, then try...
ATTRIB -R C:\MYDOCU~1\DECCA\DOCROOT\ *.* /s
ATTRIB -R C:\MYDOCU~1\DECCA\DOCROOT\
ATTRIB -R C:\MYDOCU~1\DOCROOT\ /s