Hi
Is there a way to delete lines from a text file ?
( I don't want to use "Text / Find replace" to create empty string instead )
Hi
Is there a way to delete lines from a text file ?
( I don't want to use "Text / Find replace" to create empty string instead )
Hi
Yes, although performance may be an issue depending on the size of the file. Use a File Contents iterator to loop through the lines.. create one variable for the iterator to place the line in, and another to collect the lines for the output file. Under the iterator you need to place some actions or code to determine if the line should be added to the output or not. You can use If..then or Run Script (to use VB or JavaScript). You can use the Append to Variable action to add the wanted lines to the output variable, and then once the iterator has finished you can write the output variable back to the file.
Edit : I have attached a small sample project.
deletelines.fbz5 (1.886 KB)