LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-07-2008, 09:22 AM   #1
zerocool22
Member
 
Registered: Feb 2008
Posts: 95

Rep: Reputation: 15
active directory vbs script layout


hey, i want to load my users in with a vbs script into active directory from a text file. I only got one problem the text layout is different, i mean: How it works

John, Bond, Strangepasword, test
James, Bond, Strangepasword, test

But my text file is set up like
John
Bond
Strangepasword
test

James
Bond
Strangepasword
test

How to fix this, i know my vbs script seperates cells by ",". Should i change it in vbsscript yes? how? should i change the text file with another program to match the layout, like excell. if so how do i do this?

Thx
 
Old 05-07-2008, 10:06 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
I don't know vbs script however you CAN do this in Excel if necessary because Excel allows for string "arithmetic".

Say you had the follow in cells C3-C6 in an Excel spreadsheet:
John
Bond
Strangepasword
test

In another cell you can put the following formula in:
=C3&", "&C4&", "&C5&", "&C6

Which would result in:
John, Bond, Strangepasword, test

Notice the formula uses & rather than + to "add" strings. Also notice you have to include literal strings within double quotes. Finally notice that you have to include the space after the comma in your literal string to insure you have the space in the result.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Username & Password Sync Fedora Directory and Microsoft Active Directory karnac01 Fedora 4 07-19-2010 12:51 AM
Active Directory User Cannot Write to Samba Home Directory jonwatson Linux - Networking 2 12-19-2006 12:40 PM
php connect "active directory" script paul_mat Linux - Software 3 08-03-2006 03:24 AM
php connect "active directory" script paul_mat Linux - Software 0 05-03-2006 08:01 PM
converting .vbs script to perl ? huxflux Programming 30 03-04-2006 09:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration