Deleting a line from a text file

Discuss RoboTask here

Deleting a line from a text file

Postby stevefromdodge » Wed Jan 18, 2012 1:41 pm

I have a script that's using "Search for files" to create a file listing called FileList.txt.

I would like to scan FileList.txt and delete all of the lines that start with a certain string.

Ideas?


stevefromdodge
 
Posts: 30
Joined: Tue Apr 05, 2011 3:39 pm

Deleting a line from a text file

Postby Oleg » Thu Jan 19, 2012 5:48 am

You should rewrite all text in the loop and miss certain lines
See this example, please
Oleg
Site Admin
 
Posts: 2393
Joined: Thu Jan 01, 1970 1:00 am

Re: Deleting a line from a text file

Postby Rukbunker » Fri Jan 11, 2019 10:50 am

Previous link was dead, Correct link
Using version 7.3.0.964
Rukbunker
 
Posts: 90
Joined: Mon Feb 22, 2016 4:06 pm

Re: Deleting a line from a text file

Postby Oleg » Fri Jan 11, 2019 11:16 am

Corrected, thank you.
When we transferred information from old forum engine some information may be lost
Oleg Yershov
Oleg
Site Admin
 
Posts: 2393
Joined: Thu Jan 01, 1970 1:00 am

Re: Deleting a line from a text file

Postby Oleg » Fri Jan 11, 2019 11:32 am

You can find all published examples here: http://robotask.com/samples/
Oleg Yershov
Oleg
Site Admin
 
Posts: 2393
Joined: Thu Jan 01, 1970 1:00 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 13 guests

cron