Save it to a batch file.. run it from the command line and pass the base directory to it as a parameter.

Example:
Let's say the batch file is called.. "delsub.bat" and it's saved to the root of the C: drive.. and you have a directory c:\work that you want to delete all the sub directories from.. you would do as follows:

c:\> delsub c:\work

IMPORTANT: you shouldn't add a trailing "\" to the directory name you pass.

edit2:
If you want to know how it works..@echo off
Hopefully you know what this does..

dir /b /ad %1 > dirlist.txt
Creates a file called dirlist.txt in the current working directory that contains a list of all the the subdirectories of the base directory. The "/b" does a bare listing (only the names.. none of the dates, etc). The "/ad" switch just lists the directories. The "> dirlist.txt" portion redirectes the output of the command to a file called dirlist.txt

for /f %%i in (dirlist.txt) do rd /s /q %1\%%i
Loops through the dirlist.txt file reading the directory names and runs the command "rd /s /q <directory name> for each subdirectory listed in the file. I won't go into all the switches available with the for command.. running "for /?" from the command prompt will display several pages of info.

del %1\*.*
Deletes all the files from the base directory
del dirlist.txt
Just does a little cleanup and deletes the dirlist.txt file it created. You can comment/delete this line out if you to retain the list of directories that were deleted.

edit3: made some changes because I noticed in an earlier post that you did want to delete the files out of the base directory as well.

Your way is rather simple and would work for most situations (the KISS method is always a good thing!) and it does show some imagination/troubleshooting ability that I often find lacking in many people who work in IS/IT and claim to be IS/IT professionals.

I find it is not necessary how much you know, but the ability to learn and approach problems from different ways that make one person a better tech than another.