R. C. White said:
Hi, Tim.
The del command deletes FILES, but it never was the command to delete
directories (or folders). In MS-DOS, we used rmdir or rd to Remove
Directory.
In the "DOS" window of Win2K/XP, or on the Command line, we still use rd
<directory>. As with any "DOS" command, we can type rd /? and see a
mini-Help file showing all the switches available for the command.
There are only two switches for rd: /q and /s. The /s switch removes
the entire directory tree, including all subdirectories and all files
within them; it asks "are you sure?" before deleting. The /q switch
invokes the Quiet mode, which removes everything without asking.
So, if you are sure you want to remove the entire directory tree and you
know the name of the directory at the top of the tree, just put one
short line in your batch file (for C:\Program Files\Fubar, for instance):
rd "c:\program files\fubar" /s /q
(The quotes, of course, are needed because of the space in "Program
Files".)
RC