Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
zagix
- Posts: 68
- Joined: 16 Oct 2013 23:19
#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: 630
- Joined: 28 Jun 2010 03:46
#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
#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
#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
#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.