Settings Directory

Although BitTorrent is mostly self-contained, there has to be a location where it can store its settings for later use after the first run. Because BitTorrent does not use the Windows Registry, it has to store its configuration in files on separate files on the disk. By default, those files are located at %AppData%\BitTorrent, which can be easily accessed by pressing visiting "Start" > "Run" (or by pressing Windows+R on the keyboard), typing it into the "Open" field, and pressing "OK." Typically, you'll find several .dat files in the settings directory:

  • dht.dat contains information regarding DHT that BitTorrent uses when connecting to the DHT network.
  • resume.dat contains information regarding currently loaded torrent jobs.
  • rss.dat stores all RSS-related settings, and also holds the history of previously downloaded torrent jobs. This file only gets created if you use the RSS Downloader.
  • settings.dat contains most of the settings in BitTorrent, and also contains the information listed in the statistics dialog.

Note that it is normal to find .dat.old and .dat.*.bad files in the same directory. The former file type denotes good backup files for the case that the corresponding .dat file becomes corrupted. The latter file type denotes backups of corrupted files, which may be sent to the developer for analysis if necessary.

In addition to .dat, .dat.old, and .dat.*.bad files, BitTorrent stores loaded .torrent files in its settings directory unless a storage location is specified. These files need to be stored in order for BitTorrent to work properly, so do not delete them unless you are absolutely sure BitTorrent no longer has the associated torrent job loaded any longer. If you want BitTorrent to delete the stored .torrent files automatically upon removal of the torrent job, see the description of the Remove button in the toolbar.

Encapsulated "Installation"

While %AppData%\BitTorrent is the default directory for storing the settings, BitTorrent actually searches the directory that the executable file is located in first before looking in %AppData%\BitTorrent. As such, so long as the directory that the executable is located in contains a settings.dat file (even a blank one), BitTorrent will look no further, and use only the files located in its current directory instead. With this behavior, it is possible to create encapsulated BitTorrent "installations" for use on portable flash drives, or just to have an isolated copy for any other reason.

If you don't already have an encapsulated install, you can manually move the contents of %AppData%\BitTorrent into the same directory as the BitTorrent executable to create such an install.

External Files

Besides the default .dat files, BitTorrent can make use of several other files external from the executable. Such files may modify several subtle behaviors in BitTorrent, or allow you to customize the graphical look and feel of BitTorrent. What all external files have in common is the location at which they should be placed -- the settings directory.

Extended Functionality

  • ipfilter.dat is a simple text file that specifies IP ranges to block. Only blocks are supported; any allows will be ignored. The format is as follows:
    • IPv4: xxx.xxx.xxx.xxx - yyy.yyy.yyy.yyy for each line, where each x and each y corresponds to arbitrary decimal values between 0 and 9.
    • IPv6: [xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx] - [yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy] for each line, where each x and each y corresponds to arbitrary hexadecimal values between 0 and F. Zero-grouped IPv6 addresses are accepted.
  • utorrent.chm is the user manual. The manual can be accessed via the help entry in the Help menu, or by pressing F1 on the keyboard.
  • utorrent.lng is the file that contains all available translations for BitTorrent at the time of download. When first added to the settings directory, BitTorrent will automatically switch to the system language if a translation is available. The language can be changed in the Preferences.
  • webui.zip is a zip file containing data BitTorrent will serve when the Web UI is enabled and you access http://IP:port/gui/ in a web browser, where IP is your computer's IP address, and port is the port BitTorrent is listening on. Using Web UI, you can control BitTorrent from any other computer with an Internet connection and a compatible browser installed.

Interface Customization

  • flags.conf & flags.bmp are files used to replace the internal BitTorrent assignment of flags to a peer's resolved IP's host domain. flags.conf is a text file that specifies the flag order, and maps host domains to a country, whose flag is then obtained from flags.bmp. flags.conf only works on hosts with a TLD of .net or .com, each mapping in the format host domain|country code, where the country code is the country's IANA-assigned two-letter code. flags.bmp is a Windows bitmap that contains adjacently-conjoined bitmaps of dimensions 16x16 each (without any space in between), each 16x16 square being a flag. A custom flags.conf and flags.bmp is maintained as a community project in the BitTorrent forums, compiled by eng. Pressing Ctrl+Shift+R on your keyboard tells BitTorrent to (re)load flags.conf. If peer.resolve_country is enabled, these files will be ignored.
  • main.ico is the icon that will be displayed in the icon at the top-left of the BitTorrent window.
  • maindoc.ico is the icon that will be used as a file type icon for .torrent files upon association. This is mainly used for older versions of Windows, which might have problems generating file type icons automatically for .torrent files upon association.
  • tray.ico is the icon that will be displayed in the system tray if the relevant system tray settings are enabled.
  • tabs.bmp is a Windows bitmap of dimensions 224x16, consisting of 14 adjacently-conjoined bitmaps of dimensions 16x16 each (without any space in between), that BitTorrent uses when icons are displayed on detailed info pane tabs. Icons are arranged in the following order:
    • General
    • Trackers
    • Peers
    • Pieces
    • Files
    • Speed
    • Logger
    • General (inactive)
    • Trackers (inactive)
    • Peers (inactive)
    • Pieces (inactive)
    • Files (inactive)
    • Speed (inactive)
    • Logger (inactive)
  • toolbar.bmp is a Windows bitmap of dimensions 288x24, consisting of 12 adjacently-conjoined bitmaps of dimensions 24x24 each (without any space in between), that BitTorrent uses for the images in the BitTorrent toolbar. Icons are arranged in the following order:
    • Add Torrent
    • Add Torrent from URL
    • Create New Torrent
    • Remove
    • Start
    • Pause
    • Stop
    • Move Up Queue
    • Move Down Queue
    • Search
    • Add RSS Feed
    • Preferences
  • tstatus.bmp is a Windows bitmap of dimensions 304x16, consisting of 19 adjacently-conjoined bitmaps of dimensions 16x16 each (without any space in between), that BitTorrent uses for the images in torrent job status icons and the category list. Icons are arranged in the following order:
    • Downloading
    • Seeding
    • Stopped
    • Paused
    • Downloading (tracker error)
    • Seeding (tracker error)
    • Critical Error
    • Stopped and Finished
    • Queued Download
    • Queued Seed
    • Active (category icon)
    • All (category icon)
    • Inactive (category icon)
    • RSS Feed (icon 1)
    • RSS Feed (icon 2)
    • RSS Feed (icon 3)
    • RSS Feed (invalid feed)
    • RSS Item (new release, within 24 hours)
    • RSS Item (downloaded)

External files that change the BitTorrent interface are numerous, but thankfully, there is a central repository where you can find many of them. Check out the BitTorrent Skins Page for your skinning needs! If you ever decide to create your own interface files, feel free to submit them on that page, and inform us about it in the forums!