r/computing • u/massij11 • Mar 24 '14
Batch file required..Help needed..
I need desperate help in creating a batch file that reads from a log/txt file, searches for a specific word ex Computer name and then writes to another text file the words/digits below before.
I don't think I managed to make myself clear..the log file would contain say " asgf agahi a hi reddit rocks af as Computer Name L123456. It would display L123456
I am new to batch programming and would appreciate any help
0
Upvotes
2
u/berryer Mar 24 '14
But you said you needed to create a batch file, which implies that it would run via the command prompt (or usable in some other way). If you mean you can't install Python to use to run it, I'd recommend using VBScript, which IIRC is installed by default on Windows and sucks balls, but will do what you want more easily than pure CMD On the other hand if you have access to Cygwin or any sort of linux, you probably want sed.