end prefetch block

Marks the end of a prefetch block (see begin prefetch block). This command must be present whenever the begin prefetch block command is specified. This command automatically performs a collect prefetch items command, meaning that all the files added to the prefetch list will be available when the block is ended.

Syntax

end prefetch block 

Only one prefetch command block can be used in an action script and it must be bracketed by a begin prefetch block command and an end prefetch block command.

Only comments or blank lines are allowed to precede the prefetch block. When processing actions with prefetch blocks, download as and prefetch are not allowed anywhere in the action script. The download now command is allowed after the prefetch block, but not before or inside the prefetch block.

begin prefetch block
 add prefetch item sha1=123 sha256=689 size=456 url=http://ms.com/downloads/hotfix123.exe
end prefetch block
wait {download path "hotfix123.exe"}

This code demonstrates static downloading in a prefetch block. Although it doesn't take advantage of dynamic relevance substitution, this is the preferred format for downloads in versions 7.2 and later. Note that the end prefetch block command also collects the file (hotfix123.exe), so that the subsequent wait command -- which runs and waits for completion -- is guaranteed to have the file available.

Note: Older consoles and clients will reject action scripts that use the new prefetch functionality and identify them as containing syntax errors. Older relays will not process dynamic download actions even if the server and clients can handle it.

Version 7.2 and above