Creating a For loop

Microsoft Microsoft windows xp pro full...
February 15, 2010 at 21:41:38
Specs: Windows XP, 2.4 3GB
Hi all..
I'm needing to check the Install log file on about 50 workstations to ensure that an update completed. I'm much to new to batch writing to do this by myself, so I'm pleading for your help!

The Install log (install.txt) should be easy to parse because each new line begins with the date in this format: 2010-02-15

What I need is that date and all the text (on the same line) that follows it.. to be copied to a file back on the server. I know I need a FOR F/ loop... and I have the code that will loop through the list of computers .. so I'm basically just needing this from the perspective of doing it for 1 computer.

Anyone have an idea? Again.. just wanting an example of clicking a batch file on a server.. have it go out to my 1 computer, parse a file, find today's date.. and return everything after that date to an output file back on the server.

Please let me know if you have any thoughts on how to accomplish that... Many thanks.

See More: Creating a For loop

February 15, 2010 at 23:31:49
You would not believe how much bandwidth has been burned on the subject of "today's date", really!
I figure you can parse out dates, as you seem to be capable in batchscripting... so i will just blindside it:

for /f %%a in ('find "yyyy-mm-dd"^<install.log') do echo %%a>>\\main\c\master.log

Report •

February 15, 2010 at 23:34:16
sweet.. thanks nbrane!! you know exactly what i'm up to I see. :)
Appreciate it!

Report •
Related Solutions

Ask Question