|If it's strictly 'the previous month' that's one thing. If it's to be 'more than 30 days old' that's another story.|
Either way, a first step is to run the script below and post a few lines to show the date layout.
@echo off & setLocal EnableDelayedExpansion
for /f "tokens=* delims=" %%a in ('dir/b/a-d') do (
If at first you don't succeed, you're about average.