Path

Path

The Path section of the Settings dialog lets you specify which paths should be included in or excluded from the download. It also provides a way to programmatically altering file names or entire paths.

Paths to Include or Exclude

The Include and Exclude path settings work in conjunction with the Path Constraint setting under the General settings and the Include Supporting Files setting under the Webpage settings according to the following rules:

  1. If this is the original URL (that is, the URL specified in the URL text box), then the file is downloaded.
  2. Otherwise, if the URL begins with one of the strings (or matches one of the regular expressions) in the Exclude table, then the file is not downloaded.
  3. Otherwise, if the URL meets the requirements of the current Path Constraint setting, then the file is downloaded.
  4. Otherwise, if the URL begins with one of the strings (or matches one of the regular expressions) in the Include table, then the file is downloaded.
  5. Otherwise, if the Include Supporting Files setting is on and the URL references a non-HTML file type, then the file is downloaded.
  6. Otherwise, the file is not downloaded.

In these tables, enter absolute URLs (that is, URLs beginning with http:// or https://) or regular expression patterns. URLs should be entered as they appear in the Safari address and search field, i.e., without encoding except for characters from the ISO-8859-1 extended character set and spaces (which are encoded as "%20").

If the string is a regular expression, check the corresponding Regex box. When using regular expressions, the pattern must match the entire URL. For example, to match any URL that contains an underscore, enter the .*_.* regular expression. The pattern syntax currently supported is that specified by ICU. The ICU regular expressions are described at Regular Expressions - ICU User Guide.

To add a row to the table, click the Plus button, enter the path or pattern, and press return.

To remove rows from the table, select them in the table and click the Minus button.

To modify a row, double-click on a string in the table, enter a new string, and press return.


Paths to Replace

The Replace path setting allows you to use regular expressions to replace the normal path or name of a downloaded file with a different path or name.

ReplacePath

Enter a search pattern and a substitution template for each path you would like to replace. If a file's path matches the search pattern, the path will be altered in accordance with the substitution template. All paths are relative to the destination folder, and the search pattern must match the entire path. The template specifies what is to be used to replace each match, with the backreference $0 representing the entire path, $1 representing the contents of the first capture group, and so on. Search patterns are applied in the order in which they appear in the list, and the order of search patterns can be rearranged by dragging them in the list. A path that matches multiple search patterns can be modified more than once.

For example, in the image shown above, SiteSucker is instructed to do the following:

  1. move a site's graphics folder to the root level of the destination folder and then
  2. replace mov_ found at the beginning of a file or folder name with movie_.

To add a row to the table, click the Plus button, enter the search pattern and substitution template, and press return.

To remove rows from the table, select them in the table and click the Minus button.

To modify a row, double-click on a string in the table, enter a new string, and press return.