My script for doing the job if you don't want to call functions outside the script was disturbd by a smiley,
So here's the version without a smiley (I hope)

code:
Break On
CD %TEMP%
GoSub DelTmpDir
Exit ; Script finished

; **************************
elTmpDir
; **************************

Dim $SubDir

$FileName = Dir("*.*")
While $FileName <> "" And @Error = 0
If SubStr($FileName, 1, 1) <> "."
If GetFileAttr($FileName) & 16 ; $FileName is a subdirectory
$SubDir = $FileName
CD $SubDir
GoSub DelTmpDir
CD ".."
$FileName = Dir("*.*")
While $FileName <> $SubDir
$FileName = Dir()
Loop
$Err = SetFileAttr($SubDir, 128)
RD $SubDir ; Delete subdirectory, now empty
Else
$Err = SetFileAttr($FileName, 128)
Del $FileName
EndIf
EndIf
$FileName = Dir()
Loop
Return
; *** END SUB DelTmpDir ***