Modifier Command Scope
Reference: Insert Transfer Modifiers
Archive
File_Date_Filter
Instructions
Speed
All modifier commands (Archive, Speed, Instructions, and File_Date_Filter) obey a simple scoping rule. They apply to any actions that follow them in the same block until either another modifier is encountered or the block is terminated with an End_If or End_While command. This applies to actions in embedded blocks as well. Consider the script below:
# Archive is currently None
:From:
C:\Test\Afile
:To: {Server}C:\In\Afile
:If: Send CompletedOK
:Archive: Source
# Archive Source now applies to all transfers that follow
:From:
C:\Test\Bfile
:To: C:\out\Bfile
:If: Prep CompletedOK
# Archive Source still applies in the embedded
block
:From:
C:\out\Cfile
:To: {Server}C:\In\Cfile
:Archive: None:
# Archive is now turned off
:From:
C:\out\Dfile
:To: {Server}C:\In\Dfile
:End_If: # Archive setting cancelled
# Archive now reverts to Source
:From:
C:\Test\Efile
:To: C:\Temp\Efile
:End_If:
# Archive reverts to None
Afile and Dfile are copied without archiving. Bfile, Dfile, and Efile are archived.