Google Answers Logo
View Question
 
Q: ms-dos commands ( No Answer,   0 Comments )
Question  
Subject: ms-dos commands
Category: Miscellaneous
Asked by: nfm-ga
List Price: $4.50
Posted: 02 Apr 2005 12:09 PST
Expires: 02 May 2005 13:09 PDT
Question ID: 504072
How do I delete a file in ms-dos that is protected? When I try to
delete it I get the message access denied.
Answer  
There is no answer at this time.

The following answer was rejected by the asker (they reposted the question).
Subject: Re: ms-dos commands
Answered By: till-ga on 02 Apr 2005 12:27 PST
 
The file must be signed (attributed) as read-only which prevenst it
from being deleted. You must change this attribute first to be allowed
to delete the file.
The synthax to change attributes is:

"ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:][path]filename] [/S]

+ Sets an attribute. 
- Clears an attribute. 
R Read-only file attribute. 
A Archive file attribute. 
S System file attribute. 
H Hidden file attribute. 
/S  Processes files in all directories in the specified path. "
from:
MS attrib help
( http://www.computerhope.com/attribhl.htm )

In your case you must use the -R parameter to change the Read-only to
the required value. Then you will be able to delete the file.

I hope this helps to solve your problem.

till-ga


Search strategy:
( ://www.google.de/search?sourceid=navclient&hl=de&ie=UTF-8&rls=DVXA,DVXA:2005-05,DVXA:de&q=attrib+dos
)
and personal experience of the researcher

Request for Answer Clarification by nfm-ga on 03 Apr 2005 06:58 PDT
I have not been able to remove the read-only attribute.  The file I
want to delete is in C:\_RESTORE\TEMP, and its name is A1001008.CPY. I
was in DOS and had the prompt C:_RESTORE\TEMP>. I typed -r
A1001008.CPY, but this did not work. I got a "bad command or file
name" error.  Could you tell me exactly what I should type at the
C:_RESTORE\TEMP> prompt.

Thank You
NFM

Clarification of Answer by till-ga on 03 Apr 2005 08:31 PDT
It seems that my answer was not precise enough.
The DOS program required to change the attributes is called "attrib".
Simply typing -R dos not call the program attrib.

What you have to type at the prompt is:
C:_RESTORE\TEMP>attrib -R A1001008.CPY

till-ga
Reason this answer was rejected by nfm-ga:
My original question was: "How do I delete a file in ms-dos that is
protected? When I try to delete it I get the message access denied."
The researcher provided a very exact answer, however after doing what
was specified I still could not delete the file and got the "access
denied" message.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy