I may have missed the point of the question, but if you just want a batch file to delete a directory subtree then this is that batch file:
rmdir /s /q "%~1"
Save it as (say) deletesubtree.cmd and invoke it as follows
deletesubtree "C:\my unwanted folder\data files"