Question: I want to set up an automatic task that will automatically delete files older than X days from a specific folder. I'd prefer to do it without having to install any 3rd party software, but I'll be ok if it's a very small and simple utility. 

I want this to force me to keep my files organized. I am setting my browser to download to a standard folder, and then with this script to automatically delete files older than a week, I will be forced to move & organize downloaded files I want to keep.

Answer: 
How about [Belvedere](http://lifehacker.com/5510961/how-to-automatically-clean-and-organize-your-desktop-downloads-and-other-folders) from one of [Lifehacker](http://lifehacker.com/)'s editors. 

![alt text](https://i.stack.imgur.com/1ed65.png)
I coded myself a solution for this a while back right before I found [**DelOld**](http://winhlp.com/node/386). It's a **very** small tool which does exactly what you want, and it is available as a .jar file, wrapped java executable, Visual Basic executable (MSVBVM60.DLL required), and of course as source code.

Simply supply it 2 command-line arguments -- the path of the folder, and the number of days before a file should be deleted. It can also be run through a batch script via Task Scheduler.

example:

```
DelOld.exe "C:\Downloads" 30
```

This will delete all files older than 30 days under `C:\Downloads`.