Go to Start of File Action

image\Actions_Storage_Goto_Start.jpg

The Go to Start of File action is used to move to the starting point of a disk file previously saved using the Write to Disk File, or Write Text to File actions.

This action does not read the contents of a file; it simply jumps to the beginning of the first line of text in the disk file. To read the file you can then use a: Read from disk file action; Read first line from file; Read next line from file or Read next field from file action to read the contents of the disk file and store the information in a variable.

Setting up the Go to Start of File Action:

  1. Add the Go to Start of File action to your trigger, as described in adding actions. The Go to Start of File tab will automatically appear when you add the action.

  2. Click on the down arrow to the right of the Filename option, to select the name of the disk file you want to use and then jump to the beginning of the first line of text. Alternatively, use the Browse… button to locate the file on a disk. The full pathname of the file you enter in this box is shown in the Filename field.

Note:
You can enter variables into the Filename field – the variable should contain a valid pathname for the file (see Using variables to create pathnames for more information).

The file can be on a hard disk, a networked drive or floppy disk. If the network or floppy disk is not available when the publication is run, no warning message will appear and the data is not read.

  1. Tick the Get from Windows TEMP directory option if you originally saved the text during the Write action to the windows Temp directory. By default this checkbox is not ticked.

Note:
If you use this option, the Filename field should only contain the name of the text file and not a pathname e.g. results.txt is correct while c:\studentFolder\results.txt would be incorrect.

  1. Click on the Apply button to save your changes.

Note:
This action will only work for publications that you have published using the Create a Standalone Publication option in the Publish Wizard.

Related Topics:

Introducing the Storage Actions

Restrictions Reading and Writing Disk Files

Using Variables to Create Pathnames

Disk Files vs Windows Registry