Jump to content
Macro Express Forums

Delete Whole Lines In A Text File


Recommended Posts

how can i do this


I have a text file from a server log and just want to delete all lines where my own ip was included (for better view)


by example - - [14/Jun/2005:10:45:51 +0200] "GET /g... HTTP/1.0" - - [14/Jun/2005:12:34:55 +0200] "GET /p..... - - [14/Jun/2005:10:45:51 +0200] "GET /g... HTTP/1.0" - - [14/Jun/2005:12:34:55 +0200] "GET /p..... - - [14/Jun/2005:10:45:51 +0200] "GET /g... HTTP/1.0" - - [14/Jun/2005:12:34:55 +0200] "GET /p..... - - [14/Jun/2005:10:45:51 +0200] "GET /g... HTTP/1.0" - - [14/Jun/2005:10:45:51 +0200] "GET /g... HTTP/1.0" - - [14/Jun/2005:10:45:51 +0200] "GET /g... HTTP/1.0" - - [14/Jun/2005:10:45:51 +0200] "GET /g... HTTP/1.0" - - [14/Jun/2005:12:34:55 +0200] "GET /p.....



I want to do this with a macro


1.copy the log file to a new file (server.log --------> view.txt)

2.than delete all lines where is at the beginning of each line

3.open that file for me to see


thats all


I know how to copy and open but i do not know how to delete those lines

please help

Link to comment
Share on other sites

Use the Text File Begin/End Process commands.

Text File Begin Process: "test.txt"
 If Variable %T1% does not contain ""
   Variable Modify String: Append %T1% to Text File
 End If
Text File End Process


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...