http://qs321.pair.com?node_id=798861


in reply to Reaped: This is rubbish I know.

Maybe something like:

type * 2>NUL | perl -n -e "print if /^Total\s\d{1,5}/;" > ..\newFile

When you use type with a wildcard like this, the file name being "typed" is sent to STDERR. The above removes those by redirecting STDERR to NUL (aka "the bit bucket".) The -n switch on perl wraps the program in a "while (<>) {}" loop... the "program" then prints the line if the pattern matches what you want (please note, you'll have to play with the pattern to make it what you really want). Those results are then redirected to newFile in the parent directory.

Again, the pattern I have is not exactly the same as yours (for example, I anchored it to the start of the line.) You might also want to make it case insensitive.

I'm not around very much, so chances are I may well miss any follow up questions... I'm just hoping this helps out a tad.

Replies are listed 'Best First'.
Re: Will this help?
by Win (Novice) on Oct 02, 2009 at 14:58 UTC
    I get the following error message with that.
    Can't open ..\newFile_totals_removed: No such file or directory.