@echo off
pushd f:\
echo wscript.echo dateadd("d",-1,now())>x.vbs
for /f %%i in ('cscript /nologo x.vbs') do set d=%%i
del x.vbs
if "%d:~6,1%"=="-" set d=%d:~,5%0%d:~5,5%
if "%d:~9,1%"=="" set d=%d:~,8%0%d:~8,1%
for /f "tokens=*" %%i in ('dir/s/b/ad ????-??-??') do if %%~ti lss %d% rd "%%i" /s/q