x_nick2001
Member
- Joined
- Dec 4, 2003
- Messages
- 10
Ok here is my problem :
I got a loggin script running and it writes all the information about a computer to a text file. Now I wanna be able to retrieve informations from that text file. To do so I know that the information will be on lines that begin with some specific word. So I wanna be able to find that word after that to check after all the white space what is wirtten there, or if possible to write down that line to another text file.
Here is an example :
The text file in question look like this :
PC information for Windows 9x/NT/2000/Me version 1.30
----------------------------------------------------------------
Computer: PKB4657623E
Processor: Pentium II 450MHz (L1 cash: 32.0 Kb, L2 cash: 512.0 Kb)
Bios:
Motherboard:
Memory: 256 Mb (261 688 Kb)
User: john.doe
Domain: IT
Workgroup:
Shares: t:\
v:\
Mapping: p: (\\NCCM01\cm)
So I would like to do a search on this file so that I can write the line with the computer name, the line with the user. the line withe the user, the two lines with the shares and the mapping line, all those line I want them to be written to another text file. Also if that would be possible to do in VBScript or in .Net if you dont think so.
I got a loggin script running and it writes all the information about a computer to a text file. Now I wanna be able to retrieve informations from that text file. To do so I know that the information will be on lines that begin with some specific word. So I wanna be able to find that word after that to check after all the white space what is wirtten there, or if possible to write down that line to another text file.
Here is an example :
The text file in question look like this :
PC information for Windows 9x/NT/2000/Me version 1.30
----------------------------------------------------------------
Computer: PKB4657623E
Processor: Pentium II 450MHz (L1 cash: 32.0 Kb, L2 cash: 512.0 Kb)
Bios:
Motherboard:
Memory: 256 Mb (261 688 Kb)
User: john.doe
Domain: IT
Workgroup:
Shares: t:\
v:\
Mapping: p: (\\NCCM01\cm)
So I would like to do a search on this file so that I can write the line with the computer name, the line with the user. the line withe the user, the two lines with the shares and the mapping line, all those line I want them to be written to another text file. Also if that would be possible to do in VBScript or in .Net if you dont think so.