If you want to delete folder older than specific day, you can use below command. You can add to windows schedule job for schedule run.
Delete Command For Folders
forfiles /p C:\temp\ /c “cmd /c if @isdir==TRUE RMDIR /S /Q @path” /d -30
Delete Command For Files
forfiles -p “C:\temp” -s -m *.* /D -30 /C “cmd /c del @path”
You can change this 30 parameter. This script will delete folder which is older 30 days from c:\temp\ folder.