Scripts !   

I've taken a lot of inspiration for the code samples from other sites on the web, and hope you do the same.  Many scripts will do almost everything you want - but you usually need to tweak them a little to do your bidding exactly as you want.      Just click the name to download the file - if your browser doesn't support auto-download, just "right-click" and "open in a new window".
Enjoy !