roebern
IS-IT--Management
- Oct 24, 2002
- 16
At my wits end here...
I am new to the whole VB script thing and I really need some help! I have been trying to figure out how to create a script that will read a text file that looks like the this: (only its about 20,000 Lines this is an Netware NLIST command output)
The problem is the text output is very messy in the fact that some users do not have the same number of attributes as others for example:
User: XXXUSER
Name: Name T. Name
is differant than:
User: SOMEUSER
Name: Some User
Full Name: Some E. User
is differant than:
User: USERNAME
Name: USERNAME
Home Directory:
Volume Name: ServerS1
Path: HOME2\XXXXXX
Name Space Type: DOS
Full Name: User T. Name
NGW: File ID: 8h2
NGW: Post Office: POXXXX
NGW: Account ID: My Account Id
Basically I am trying to get everything on the same line and written to another text file
for example:
test.txt
User: XXXUSER, Name: Name T. Name
User: SOMEUSER, Name: Some User, Full Name: Some E. User
User: USERNAME, Name: USERNAME, Home Directory:, _
Volume Name: ServerS1, Path: HOME2\XXXXXX, _
Name Space Type: DOS, Full Name: User T. Name, _
NGW: File ID: 8h2, NGW: Post Office: POXXXX, _
NGW: Account ID: My Account Id
I figured out how to at least get the user: username lines parsed out and into another file with the inStr function which was a major accomplishment for me but I kinda feel like I was barking up the wrong tree...
If anybody out there has any suggestions or ideas on how to better accomplish this any tips or a point in the right direction would be much appreciated...
Thanks
Nathan
I am new to the whole VB script thing and I really need some help! I have been trying to figure out how to create a script that will read a text file that looks like the this: (only its about 20,000 Lines this is an Netware NLIST command output)
The problem is the text output is very messy in the fact that some users do not have the same number of attributes as others for example:
User: XXXUSER
Name: Name T. Name
is differant than:
User: SOMEUSER
Name: Some User
Full Name: Some E. User
is differant than:
User: USERNAME
Name: USERNAME
Home Directory:
Volume Name: ServerS1
Path: HOME2\XXXXXX
Name Space Type: DOS
Full Name: User T. Name
NGW: File ID: 8h2
NGW: Post Office: POXXXX
NGW: Account ID: My Account Id
Basically I am trying to get everything on the same line and written to another text file
for example:
test.txt
User: XXXUSER, Name: Name T. Name
User: SOMEUSER, Name: Some User, Full Name: Some E. User
User: USERNAME, Name: USERNAME, Home Directory:, _
Volume Name: ServerS1, Path: HOME2\XXXXXX, _
Name Space Type: DOS, Full Name: User T. Name, _
NGW: File ID: 8h2, NGW: Post Office: POXXXX, _
NGW: Account ID: My Account Id
I figured out how to at least get the user: username lines parsed out and into another file with the inStr function which was a major accomplishment for me but I kinda feel like I was barking up the wrong tree...
If anybody out there has any suggestions or ideas on how to better accomplish this any tips or a point in the right direction would be much appreciated...
Thanks
Nathan