The Path settings provide a way to programmatically alter the names and paths of downloaded files.
The Path pane of the Settings dialog provides the following controls:
Ignore Filename in Headers
Check this box to have SiteSucker ignore the filename directive in all HTTP Content-Disposition headers. See File Names for more information about how SiteSucker names downloaded files.
Replace Special Characters with ‘_’
Check this box to have SiteSucker replace special characters with the ‘_’ character in folder and file names. Special characters are either characters that should never appear in a folder or file name (such as, ‘/’, ‘:’, and ‘\’) or characters that could cause problems loading a downloaded file in a web browser (such as, ‘#’, ‘%’, ‘?’, and ‘|’). If this box is not checked, special characters are replaced with look-alike characters.
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. See File Names for more information about how SiteSucker names downloaded files.
Enter a file path pattern and a substitution template for each path you would like to replace. If the regular expression pattern matches a file’s path, the path will be altered in accordance with the substitution template. For a match to occur, the regular expression must match the entire path as it would appear in the Finder relative to the destination folder. The template specifies what should 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. Patterns are applied in the order in which they appear in the table, and the order of file path patterns can be rearranged by dragging them in the table. A path that matches multiple patterns may be modified more than once.
For example, in the image shown above, SiteSucker is instructed to do the following:
move a site’s
graphicsfolder to the root level of the destination folder and then
htmlextension from any file that already has a
To add a row to the table, click the button, enter the file path pattern and substitution template, and press ↩.
To remove rows from the table, select them in the table and click the button.
To modify a row, double-click on a string in the table, enter a new string, and press ↩.