Partilhar via


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 https://www.microsoft.com/downloads/info.aspx?u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f9%2f0%2fb%2f90b2097b-cb79-40fd-9d00-0917afc039e1%2fxnagse_setup.msi 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 https://tinyurl.com/yhmojh 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 https://tinyurl.com/yhmojh xnase.msi

bitsadmin /ADDFILE xnase https://example.com/example.zip ex.zip

...

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:\\example.com\images\test.png c:\users\example\desktop\test.png

Comments

  • Anonymous
    December 24, 2006
    The comment has been removed
  • Anonymous
    December 26, 2006
    The comment has been removed
  • Anonymous
    August 06, 2008
    Microsoft’s Background Intelligent Transfer Service (BITS) has been around since Windows 2000 SP3 and