Report actions from Batch in report.txt

I use a batch file to xcopy files from one source to several destinations on a weekly basis..using this command for each file...
xcopy /d/y %source%sp6501.wav %path1% >>report.txt

I use this command on over 100 audio files and so the report.txt file is very long and some weeks most of the files are not copied becuase they do not get changed, so I end up with a report.txt file with tons of "0 File(s) copied" lines.  

I would like to eliminate the "0 File(s) copied" lines from the txt file before it gets emailed, which is handled at the end of the batch using blat.  So how do I either get the xcopy NOT to write the report.txt if the file does not get copied or maybe just have the batch go back through the report.txt file at the end of the batch job and delete all of the 0 lines it before it emails.  Whichever is easiest is what I want to go with.
murrycAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steve KnightIT ConsultancyCommented:
Just passing quickly.... try this:

xcopy /d/y %source%sp6501.wav %path1%  | find /v "0 file(s) copied" >>report.txt


or

find /v "0 File(s) copied" < report.txt > report2.txt

and snd yourself report2.txt

Steve

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Agreed. Depending on what your common parts are, you can optimize the batch by using FOR loops, but that doesn't change how you need to filter the unwanted output.
subhashchyCommented:
Sorry to interfere Dragon sir. I guess you missed a typo here in the first line .

Since find command is case sensitive
 
xcopy /d/y %source%sp6501.wav %path1%  | find /v "0 file(s) copied" >>report.txt

Open in new window

should not work correctly.

 Murryc.You should either add a /i switch in find command or or use "0 File(s) copied" (F in upper case).

Any of below should work.

xcopy /d/y %source%sp6501.wav %path1%  | find /v "0 File(s) copied" >>report.txt

Open in new window


or
xcopy /d/y %source%sp6501.wav %path1%  | find /v /i "0 file(s) copied" >>report.txt

Open in new window


Thank you.
Steve KnightIT ConsultancyCommented:
Not interfering, and cut the sir!!  Agreed was typo, was being quick.
Steve
subhashchyCommented:
Roger that..  Thank you Steve .

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.