forfiles -p "C:\what\ever" -s -m *.* -d <number of days> -c "cmd /c del @path"
See forfile documentation for more details.
For more goodies refer to An A-Z Index of the Windows XP command line
If you don't have forfiles installed on your machine, copy it from any Windows 2003 Server to your Windows XP machine at %WinDir%\system32\ This is possible since the EXE is fully compatible between Win2003 and WinXP.
Later versions of Windows and Windows Server have it installed by default.
Update Win7: Syntax has changed a little therefore the updated command is:
forfiles -p "C:\what\ever" -s -m *.* /D -<number of days> /C "cmd /c del @path"
ref from stackoverflow