How to use BITS to transfer files

BITS is Microsoft's background intelligent transfer service.  It's used to transfer files without it bothering you (roughly).  The goal is to use idle bandwidth, so it doesn't affect that streaming radio station that you like, your video chat, etc.

The service is relatively full-featured, although there isn't a proper UI that I'm aware of (not sure why this wasn't baked into IE7).  I've usually whipped up a simple .net app to do this kind of thing (large files, bad connections), but it initially didn't handle proxies that well and was never great and didn't do the idle-bandwidth thing.  Enter BITSAdmin.

BITSAdmin is a simple command-line tool shipping with Vista, and available as a download for XP and above.

Here's a sample of how to download XNA Game Studio Express 1.0:

BITSAdmin /transfer xnase xnase.msi

Here's another example of the same thing via tinyurl (it can help avoiding a lot of escaping of ampersands):

bitsadmin /transfer xnase xnase.msi

This does it right away and lets you watch it.  If you don't want that console window hanging around, or want to do several at once you can use this alternate syntax (bitsadmin /? shows the help but it's overly verbose and lacking decent simple examples before it launches into the 200 lines of help).

bitsadmin /CREATE /DOWNLOAD xnase

bitsadmin /ADDFILE xnase xnase.msi

bitsadmin /ADDFILE xnase


bitsadmin /RESUME xnase

bitsadmin /MONITOR (till it's done)

bitsadmin /COMPLETE xnase

You can adjust it's priority, set notifications, peer caching, etc, etc, etc.

Update: it seems to require the full path for the destination file now (Thanks Rick).

bitsadmin /transfer myjob http:\\\images\test.png c:\users\example\desktop\test.png