I'm working on a batch file that will search an input file containing entries of (act,pmt,dps). What I want to do is search this document for those entries and send them to seperate text file.
For instance all "act" entries would be sent to act.txt. I found two ways of doing this. One is rather long. (%1 would be name of the input file that would be entered with batch file. %2 would be three letters of the day... MON,TUE...)
FIND /i "act" D:\lama\%1 > D:\lama\%2ACT.txt
Basically I would do that three times. One for each entry. Then I tried this... which... seems completely messed up but works.
FOR %%A IN (DEP,ACT,PMT) DO FIND /i "%%A" D:\student\%1 >D:\student\%2%%A.txt
My question is does anyone know of a better way of accomplishing this. Thanks in advance. (And yeah i know it seems stupid asking for help with something I have two ways of doing.)