|
Answer» Okay, as part of a Utility that I'm making, I want to extract information from a text file. From the following sample: mod_RedPowerArray=on mod_RecipeBook=on mod_IC2=on mod_Somnia=on
I'd want the script to display
RedPowerArray RecipeBook IC2 Somnia
Is there a way of doing this?If EVERYTHING follows the same format, you can use this one LINER to do what you are asking:
CODE: [Select]for /f "delims=_= tokens=2" %%A in (%textfile%) do echo %%A You'll have to SET the %textfile% variable at an earlier stage or just hardcode it in if it will not change. Remember to use the usebackq option if you need to use quoation marks for the file name.That's great thanks
|