Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 391
  • Last Modified:

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?
0
Remulac
Asked:
Remulac
  • 3
2 Solutions
 
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now