There are two things you can do with Leech's rules system:
-
Set a custom download folder for certain…
- file types (based on a given file's name extension) or
- servers (based on a given download's "host" URL part, see below: "Specifying Hosts")
-
Choose an application to open certain…
- file types (again, based on a given file's name extension)
Creating Rules
To create a new rule, choose Define Rule… from Leech's File menu. Then enter at least one host name or file name extension. Once you have done so, you can choose a custom download folder and/or application with which to open downloaded files.

If you enter hosts and extensions, only URLs that match both one of the hosts and one of the extensions will be treated according to this rule. For instance, the above rule will only apply to files ending in dmg that are downloaded from manytricks.com. The rule will save such files into a special folder (Many_Tricks), and automatically mount the disk images by launching DiskImageMounter.
Also, please note that you can only use the 'Open with [application]' feature for rules that define one or more file types.
Once you have your rule set up as you like, click Save, and your rule will then be visible near the bottom of Leech's File menu.
Specifying Hosts
Leech detects host matches based on one simple criterion: A given download URL must contain every host part (top-level domain, domain name, subdomains) you specify in your rule. Here are some examples:
Rule: Host | Download URL | Result |
---|---|---|
com | http://domain.com/file.zip | match |
http://www.domain.com/file.zip | match | |
http://subdomain.domain.com/folder/file.zip | match | |
http://domain.org/file.zip | no match | |
http://anotherdomain.com/file.zip | match | |
domain.com | http://domain.com/file.zip | match |
http://www.domain.com/file.zip | match | |
http://subdomain.domain.com/folder/file.zip | match | |
http://domain.org/file.zip | no match | |
http://anotherdomain.com/file.zip | no match | |
www.domain.com | http://domain.com/file.zip | no match |
http://www.domain.com/file.zip | match | |
http://subdomain.domain.com/folder/file.zip | no match | |
http://domain.org/file.zip | no match | |
http://anotherdomain.com/file.zip | no match | |
subdomain.domain.com | http://domain.com/file.zip | no match |
http://www.domain.com/file.zip | no match | |
http://subdomain.domain.com/folder/file.zip | match | |
http://domain.org/file.zip | no match | |
http://anotherdomain.com/file.zip | no match |
You can create as many rules as you like; once created, you can edit or remove rules by accessing them in the File menu.