how to remove the first five lines in flat file using Arc script
Solved
Arc script
Best answer by Rohit
Hi @bala_bk,
You can use the fileReadLine operation in the Arc script to read the file line by line. By checking if the index value is greater than 5, you can then push the relevant data to the output.
Below is a sample script to remove the first 5 lines from a flat file:
<arc:set attr="file.file" value="[filePath]" />
<arc:set attr="output.data">
<arc:call op="fileReadLine" in="file" out="line">
<arc:if exp="[_index] > 5">[line.file:data]\n</arc:if>
</arc:call>
</arc:set>
<arc:push item="output" />
Please refer to our documentation on fileReadLine for more information: https://cdn.cdata.com/help/AZK/mft/op_FileReadLine.html
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.

