DOS Switch Error

I'm trying to delete the contents of a directory from a DOS batch file like this:


del *.* f:\cemich\wwwroot /y

I get the error "invalid swtich".  I've tried it like this also:

del *.* /y f:\cemich\wwwroot

and get the same error.  What switch do I use to enable my batch program to delete the files in that directory without me being prompted during execution of the batch?
RemulacAsked:
Who is Participating?
 
InteractiveMindCommented:
Do this:

   del f:\cemich\wwwroot\*.* /q
0
 
InteractiveMindCommented:
Although, to be on the *safe* side, you should also add quotes, ie:

   del "f:\cemich\wwwroot\*.*" /q

For more information on using the DEL command, at the Command Line, type:

   del /?

Regards;
0
 
InteractiveMindCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.