Delete Lines

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
zagix
Posts: 68
Joined: 16 Oct 2013 23:19

Delete Lines

#1 Post by zagix » 10 Mar 2015 01:54

Hi,

I need to delete these lines

Code: Select all

 company name company name company name branch  branch name     ledger         printing      02/07/2014 July 2014        PAGE:   X
as they reoccur in text file repeatedly.

Any simple way to whip out instantly, Only the PAGE: X changes else is constant.

Thanks.

miskox
Posts: 554
Joined: 28 Jun 2010 03:46

Re: Delete Lines

#2 Post by miskox » 10 Mar 2015 03:19

Something like this might do the trick:

Code: Select all

findstr /B /V /C:"company name company name company name branch  branch name     ledger         printing      " filename.txt >newfile.txt


Saso

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Delete Lines

#3 Post by foxidrive » 12 Mar 2015 03:34

There's an invisible character at the beginning of the line and the PAGE: X
is on the end of the line.
zagix wrote:I need to delete these lines

Code: Select all

 company name company name company name branch  branch name     ledger         printing      02/07/2014 July 2014        PAGE:   X


I'd bet my glass of beer that X is not really X and that the date and time can change, at the very least.

zagix
Posts: 68
Joined: 16 Oct 2013 23:19

Re: Delete Lines

#4 Post by zagix » 21 Mar 2015 01:24

Hi,

Foxidrive you are genius.

There's an invisible character at the beginning of the line and the PAGE: X
is on the end of the line.


That's 100% true the invisible character is page break sign.
The X was to displayed to show that they will change on each page.

Genius foxidrive, provide some solution.

Thanks.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Delete Lines

#5 Post by foxidrive » 21 Mar 2015 06:33

zagix wrote:Genius foxidrive, provide some solution.


This is the kind of genius I am. If you provide actual details of the task then you may get a solution that works.

Image

brinda
Posts: 78
Joined: 25 Apr 2012 23:51

Re: Delete Lines

#6 Post by brinda » 21 Mar 2015 07:37

foxidrive wrote:Image



wow brings back memory of road runner :lol: :lol:

Squashman
Expert
Posts: 4470
Joined: 23 Dec 2011 13:59

Re: Delete Lines

#7 Post by Squashman » 21 Mar 2015 19:40

Meep Meep!

Post Reply