Hi there,
I'm not sure if SQL is capable of this so I would like your ideas and
comments.
I have over a thousand text files with in the below format.
[Win32_OperatingSystem]
ComputerName=computerHostName
OSName=Microsoft Windows XP Professional
OSVersion=5.1.2600
ServicePackMajorVersion=1
ServicePackMinorVersion=0
OSSerialNumber=bla bla bla
InstallDate=08/09/2004 15:53
LastBootUpTime=04/11/2004 09:10
[Win32_ComputerSystem]
Domain=mine.com
Manufacturer=Hewlett-Packard
Model=HP Compaq nc6000
TotalPhysicalMemory=1,023 MB
[Win32_Processor]
Count=1
CurrentClockSpeed=797
[Win32_BIOS]
SMBIOSVersion=68BDD Ver. F.0A
SerialNumber=Bla Bla Bla
[Win32_LogicalDisk (size in MB)]
Count=2
Size of C: drive=29,996
FreeSpace on C: drive=19,885
%FreeSpace on C: drive=66%
Size of D: drive=8,151
What i want to do is take each field from these text files and put them into
a MySQL table. Ignoring the lines with the headings in i.e [ignore]
Is there an sql statement i could use to readline from a text file and put
it into MySQL or is this something i would need to write a VB script for?
Also the second problem comes once it has finished one text file i want it
to move onto the next text file in the folder. As i say this folder
contains over 2 thousand text files and I will want to run this script at
least once a week to update the tables.
Any ideas would be greatly appreciated.
Thanks in advance
--
Jamie Allison
Sheffield Hallam University
Software Engineering
Final Year