Configure a File System Watch Hosted Script Task

Use a hosted script task to run a Visual Basic script or batch file when a file with a specified extension is either moved or copied to the watch path.

Activity Steps

  1. In the Configuration Explorer, expand the Tasks node.
  2. Expand the required task group node.
  3. Right-click the File System Watch node and select New Hosted Script Task from the menu.
  4. Double-click the hosted script task node.

    The File System Watch Hosted Script Task screen displays.

  5. Complete the fields in the File System Event Settings field group. (See Managing File System Watch Tasks for a description of these fields.)
  6. On the Configuration tab:
    1. Select whether to Enable Timeout.
    2. If Enable Timeout is checked, enter the Timeout in seconds.
    3. In the Arguments field group, complete the following fields.
      • Pass File Name And Path As Argument 1—Whether the file name and path are passed to the script as argument 1.
      • Pass Schedule Date And Time As Argument 2—Whether the schedule date and time is passed to the script as argument 2.
      • Date And Time Format—The format of the schedule date and time if Pass Schedule Date And Time As Argument 2 is checked.
      • Additional Arguments—The additional arguments that are to be passed to the script. Enter one argument per line.
  7. On the Script tab:
    1. Select whether the Script is a BatchFile or VBScript.
    2. Enter the Script/Batch File Contents.
  8. Click Save.