Jump to content

simple: making directories


Recommended Posts

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

Link to comment
Share on other sites

Why not just use DirCreate.


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

Link to comment
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"

Edited by BigDod


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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...