Sorry, didn't mean to get you lost in that Perl code. That code can be fairly easily written in KiX code. I use Perl because I compile it and can give it to the people that wanted the data. Makes it easy for them.
The data file listed first is what is written from my KiXtart logon script. I use the ":" and "white space" as the delimiter that separates the data field name and the value.
The second part of the post is my quick change Perl code that (basically):
1. loops through the listed directories
2. opens the directories and collectes the file names
3. opens the file
4. reads each line
5. splits the line using Regular expressions loading $field and the $value vars.
6. pushes the values into an array of arrays
7. joins the array values with the "~" delimiter
8. Write the file.
The output file (lines broken for display):
code:
LogonTime(GMT -4)~DOS~Specific OS~OS Suite~OS Small Business~OS Enterprise~OS BackOffice~OS CommServer~
OS Terminal Server~OS Small Business (Restricted)~OS Embedded NT~OS DataCenter~OS Single User TS~OS Home Edition~
OS Blade Server~Admin Rights~SMS Client~System Date~User Language~System Language~Rpcrt4.dll Version~
Working IP Address~Working Subnet Mask~Working Gateway~Subnet~Working MAC Address~Host Name~Domain~
Windows 2000 Site~RAS Sessions~VPN Session~User~Full Name~Logon Server~Logon Domain~Computer Name~CSD~
MS03-026~Cleaned~SysRestore Stop~SysRestore disabled
2003/09/03 08:55:45~5.0~Windows 2000 Professional~0~0~0~0~0~0~0~0~0~0~0~0~0~0~2003/09/03~0810Italian~
0409English~5.00.2195.5419~162.109.127.48~255.255.255.128~162.109.127.1~162.109.127.0~006008B37474~2k-nbquality~
LUG-CH~~0~0~GL000636~Lorenz, Elena~\\EMADH2~AMPx1~2K-NBQUALITY~Service Pack 3~0~0~~
2003/08/28 11:28:38~5.0~Windows 2000 Professional~0~0~0~0~0~0~0~0~0~0~0~0~1~1~2003/08/28~0409English~
0409English~5.00.2195.6753~169.254.101.152~255.255.0.0~~169.254.0.0~006008ED72F4~apandini.us.tycoelectronics.com~
US-TYCO-E~US-CA-ELCON~0~0~US055712~Pandi, Lucia~\\AMBDC105~AMPx1~APANDINI~Service Pack 3~1~0~~
[ 06. September 2003, 06:39: Message edited by: Howard Bullock ]