Kampachi

May, 2006
back

I like lowest-common-denominator kinds of things. It occurred to me that there are precious-few "simple" ways to copy a whole directories around the net. Sure you can zip them, but it seems like it should be possible to have a tool that can mirror whole folders. And what's more common that Apache's Index format?

Generally speaking, Microsoft's URLDownloadToFile makes it insanely easy to get one file, except it doesn't preserve the file date in the saved file. The date is available at the HTTP level, but I decided for this little utility to just ignore that and get approximate dates directly from the index. My reasoning is that I might be able to "sync" from just the index in the future, whereas doing a bunch of last-modified requests would be rude in comparison.

Anyway, now there's a little utility called "kampachi" that can download a whole folder of files from any Apache server that has "Options Indexes" turned on.

kampachi.exe [52k]
As an example, let's download the kampachi source code. To do that, go to the cmd shell and type:
kampachi http://www.stereopsis.com/kampachi/src/ kampachi-src
And you'll have a copy for yourself.