|I've tested the following on my machine and it seems to work like you want. BE SURE TO TEST THIS BEFORE YOU USE IT FOR REAL!!!|
Add the following script to what you already have and change the path to whatever folder contains the folders that need to be deleted if they are over 10 days old.
forfiles /s /d -10 /c "cmd /c IF @isdir == TRUE rd /S /Q @path"