Did you consider renaming your folders? If you have them in the format yyyymmdd, it is much easier to manipulate them. For example, they will be sorted correctly if you sort by name, and you can immediately compare with less-than or greater-than.
>Dear Experts
>
>I have a folder entitled "Tables".
>It has sub folders named as
>
>12102005
>13102005
>14102005
>15102005
>16102005
>17102005
>
>The name of folders are like British Date
>I want to delete the folders that names are less than date()-2
>and suppose today date is 17102005
>
>After applying command the following folders will be delete
>
>12102005
>13102005
>14102005
>15102005
>
>and following folders will be left in "Tables"
>
>16102005
>17102005
>
>Please Help
>Thanks in advance
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)