Link to home
Start Free TrialLog in
Avatar of wasabi3689
wasabi3689Flag for United States of America

asked on

how to find then copy to anotehr file

I have a file named "ABC.txt" with many  "File not found" lines. I want to have dos script to read this,  find those  "file not found" lines, then put all together into a new file and dump into C:\

How to have this script?
Avatar of oBdA
oBdA

No real need for a script here; you can use this directly in a command prompt:
type ABC.txt | find.exe /i "File not found" >"C:\FileNotFound.txt"

Open in new window

Avatar of wasabi3689

ASKER

how to add a timestamp to the FileNotFound.txt?
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial