Windows – How to copy a text from one file into another file

batchcommand linewindows

How can I copy the line of a text file (C:\dos\crusoe\src.txt) if the text meghana is in it, and paste the line into another file (C:\dos\crusoe\trgt.txt)?

Best Answer

I believe on Windows you'd be looking for findstr -

For example:

findstr /x /c:<string> <source-file-name> > <target-file-name>