+ Post New Thread
Results 1 to 2 of 2
Scripts Thread, altering these scripts to also create sub-folders in users H:\ drive in Coding and Web Development; I have a sequence of batch files / commands I run at the start of each year to set up ...
  1. #1
    kennysarmy's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    1,286
    Thank Post
    80
    Thanked 45 Times in 31 Posts
    Rep Power
    30

    altering these scripts to also create sub-folders in users H:\ drive

    I have a sequence of batch files / commands I run at the start of each year to set up the new intake.

    These are:

    ONE.
    On server at command prompt type addusers /c d:\addusers\2008\newuser.csv
    where newuser.csv has the following entries:
    [User]
    Usernam Surname Forename School Pupil

    TWO.
    Run pupils.bat
    which has the following entries:
    @call mkdir.bat 3357 33 3300 57
    @call mkdir.bat 4453 44 4400 53

    where mkdir.bat has the following entries:
    mkdir D:\Users\%3\%4
    net share %1$ /d
    net share %1$=D:\Users\%3\%4 /users:5
    echo y|cacls D:\Users\%3\%4 /t /c /g %1:c "CREATOR OWNER":f "Domain Admins":f Staff:c Administrators:f
    net user %1 /HOMEDIR:\\FP2\%1$
    net user %1 /SCRIPTPATHupils.bat

    THREE
    In AD add newly created pupils to pupils group highlight all new pupils, right click and choose Add members to group


    Now, what I want to do is also create sub-folders in each user area created say for "ICT", "Maths", "DT" etc.

    Any suggestions welcome

    Thanks.

  2. #2

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,154
    Thank Post
    114
    Thanked 527 Times in 450 Posts
    Blog Entries
    2
    Rep Power
    123
    Just change
    Code:
    mkdir D:\Users\%3\%4
    to
    Code:
    mkdir D:\Users\%3\%4
    mkdir D:\Users\%3\%4\maths
    mkdir D:\Users\%3\%4\ict
    mkdir D:\Users\%3\%4\design
    or (bit more flash :-))

    Code:
    mkdir D:\Users\%3\%4
    for %%i in (ict maths dt) do mkdir D:\Users\%3\%4\%%i

  3. Thanks to srochford from:

    kennysarmy (3rd July 2008)

SHARE:
+ Post New Thread

Similar Threads

  1. Mapping network drive without using Scripts
    By tazz in forum How do you do....it?
    Replies: 13
    Last Post: 5th October 2007, 03:18 PM
  2. Problem with Home Drive and login scripts
    By ArchersIT in forum Windows
    Replies: 4
    Last Post: 11th July 2007, 12:17 PM
  3. VB Script to create folders
    By markesmith in forum Scripts
    Replies: 2
    Last Post: 26th April 2007, 03:03 PM
  4. Replies: 0
    Last Post: 17th February 2007, 04:43 PM
  5. Script to Create My Documents Subject Folders
    By SwedishChef in forum Scripts
    Replies: 15
    Last Post: 5th July 2006, 08:14 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •