Go to Next Line of File Action

image\Actions_Storage_Goto_Next_Line.jpg

The Go to Next Line of File action is used to move to the beginning of the next line of text in 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 next line of text in the disk file from its current line of text.

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 Next Line of File Action:

  1. Add the Go to Next Line of File action to your trigger, as described in adding actions. The Go to Next Line 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 move to the next line of from its current line position. 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