views:

305

answers:

2

Hi,

i use windows.

i want to delete all files and folders in a folder by system call.

i may call like that:

>rd /s /q c:\destination
>md c:\destination

do u know an easier way?

A: 

Why not use unix commands on windows?

See http://unxutils.sourceforge.net/

RED SOFT ADAIR
Definitely easier, right ... We trade in two short lines of code for a download, an installation and, like, 300 executables.
Joey
+2  A: 

No, I don't know one.

If you want to retain the original directory for some reason (ACLs, &c.), and instead really want to empty it, then you can do the following:

del /q destination\*
for /d %x in (destination\*) do @rd /s /q %x
Joey
it's the way to do it
Peter Kofler