Does anyone have any example Arc script that uses the fileReadLine operation to walk through an input file, parsing text line-by-line?
Solved
fileReadLine Example Scripts
Best answer by James B
Hi Walter,
The fileReadLine operation operates like an enumerator, returning one result for every line in the file, using the new line character as a separator.
Passing in the following file:
red
orange
yellow
green
blue
purple
Through this code in a Script connector:
<arc:set attr="file.file" value="[FilePath]" />
<arc:call op="fileReadLine" item="file">
<!-- the file:data attr in the output item has the line -->
<arc:set attr="output.filename" value="[file.file:data]" />
<arc:push item="output" />
</arc:call>
Would output 6 files for each line in the document.
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

