Sign in to follow this  
Followers 0
jon_in_vermont

simple: making directories

5 posts in this topic

Hello,

I need to process a list of usernames, create home directories, set permissons, etc. I'm a newbie and I'm stuck at creating the directories. Any ideas? Everything is working fine until the Run command - thanks in advance! :whistle:

; Read in lines of text until the EOF is reached

While 1

$line = FileReadLine($file)

If @error = -1 Then ExitLoop

$parse = StringInStr($line, "@")

; MsgBox(0, "char number:", $parse)

$realnum = $parse - 1

$name = StringLeft($line, $realnum)

;MsgBox(0,"name",$name)

;Run(@ComSpec & "/c " & " md \\geo\DATAVOL\geohome\$name")

Run(@ComSpec & "/c md \\geo\DATAVOL\geohome\$name")

Wend

jc

Share this post


Link to post
Share on other sites



Why not just use DirCreate.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Why not just use DirCreate.

Ahh...because I'm new - Thanks! That works..but, now I'm getting my variable name ($name) created instead of the variable. Must be another dopey new question, but I'll look on my own till an easy answer comes along.

Thanks again!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Try using $name instead of "$name", just a wild guess.

Edit

Or "\\geo\DATAVOL\geohome\" & $name instead of "\\geo\DATAVOL\geohome\$name"

Edited by BigDod


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Try using $name instead of "$name", just a wild guess.

Edit

Or "\\geo\DATAVOL\geohome\" & $name instead of "\\geo\DATAVOL\geohome\$name"

That did it - I was removing the quotes, but not using &. Great - Thanks BigDod..... I may be back for more. I owe you a beverage.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0