+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 22
How do you do....it? Thread, Bulk folder Creation in Windows in Technical; A few years ago I set up a set of empty folders in all user home areas to encourage them ...
  1. #1

    Join Date
    Jan 2007
    Location
    Leicestershire
    Posts
    60
    Thank Post
    0
    Thanked 9 Times in 4 Posts
    Rep Power
    17

    Bulk folder Creation in Windows

    A few years ago I set up a set of empty folders in all user home areas to encourage them to file work according to subject. So each user had /My Documents/ICT, /My Documents/Science etc..

    Unfortunately I have lost the script which accomplished this. I know it was something I had to type in a terminal window, but that's about it. We are using MS Server 2003/XP Workstations with Ranger.

    Any ideas?

    Cheers.

  2. #2
    Kyle's Avatar
    Join Date
    Jan 2006
    Posts
    972
    Thank Post
    91
    Thanked 14 Times in 13 Posts
    Rep Power
    21

    Re: Bulk folder Creation in Windows

    I have a CMD file that does just this but its at work, if no one replies tonight I'll sort it out for you tomorrow.

  3. #3

    Join Date
    Jan 2007
    Location
    Leicestershire
    Posts
    60
    Thank Post
    0
    Thanked 9 Times in 4 Posts
    Rep Power
    17

    Re: Bulk folder Creation in Windows

    What a quick response!! Thanks very much, Kyle.

  4. #4

    Dos_Box's Avatar
    Join Date
    Jun 2005
    Location
    Preston, Lancashire
    Posts
    9,840
    Thank Post
    583
    Thanked 2,162 Times in 987 Posts
    Blog Entries
    23
    Rep Power
    627

    Re: Bulk folder Creation in Windows

    You should have posted it at 3am, it would have been quicker!*




    *Bloody innsomniac members!

    P.S. Oh, and welcome BTW

  5. #5
    tosca925's Avatar
    Join Date
    Aug 2005
    Location
    Midlands
    Posts
    1,547
    Thank Post
    4
    Thanked 4 Times in 4 Posts
    Rep Power
    22

    Re: Bulk folder Creation in Windows

    You should have posted it at 3am, it would have been quicker!*
    I'm nornally hovering around here till 1-00am but it does go quiet after 11-30pm.

    With all these new members and all these added posts it takes me ages to get through them all on a daily basis.

  6. #6
    pooley's Avatar
    Join Date
    Sep 2005
    Location
    S Wales
    Posts
    1,129
    Thank Post
    77
    Thanked 118 Times in 99 Posts
    Rep Power
    66

    Re: Bulk folder Creation in Windows

    Anychance of a copy of the script or cmd file ?

    cheers

  7. #7

    Join Date
    Jan 2007
    Location
    Leicestershire
    Posts
    60
    Thank Post
    0
    Thanked 9 Times in 4 Posts
    Rep Power
    17

    Re: Bulk folder Creation in Windows

    I sent a PM to Kyle back in January asking if he'd mind sending me the script, but he hasn't got back to me :-(

  8. #8

    Join Date
    Feb 2006
    Posts
    1,187
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Bulk folder Creation in Windows

    Quote Originally Posted by scgf
    A few years ago I set up a set of empty folders in all user home areas to encourage them to file work according to subject. So each user had /My Documents/ICT, /My Documents/Science etc..

    Unfortunately I have lost the script which accomplished this. I know it was something I had to type in a terminal window, but that's about it. We are using MS Server 2003/XP Workstations with Ranger.

    Any ideas?

    Cheers.
    How are your student home folders arrange flat directroy or year group?

    The easier thing to do would be this

    Code:
    CD <folder containing student My Documents folders>
    for /f %%s in ('dir /ad/b') do MD "%%s\Subject"
    You can repeat the last line for as may subjects as you need, rembering to substitute ENGLISH, MATHS, SCIENCE etc for Subject.

  9. #9

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,341
    Thank Post
    624
    Thanked 1,584 Times in 1,421 Posts
    Rep Power
    414

    Re: Bulk folder Creation in Windows

    Why not just do it in a login script.

    if not exist h:\mathematics md h:\mathematics

    etc...

    Ben

  10. #10

    Join Date
    Jan 2007
    Location
    Leicestershire
    Posts
    60
    Thank Post
    0
    Thanked 9 Times in 4 Posts
    Rep Power
    17

    Re: Bulk folder Creation in Windows

    Thanks, NetworkGeezer.

    On our system, user folders on the server follow this pattern. Take John Smith in year 8:

    E:\Data\Users Home Directories\Students\04smithjo

    John's My Documents folder will be inside 04smithjo.

    All student folder are inside the Students directory and year groups are differentiated by the initial two digits - representing the year that cohort entered the school.

    How would your script work with this path?

    If you need a UNC it is \\Server1\Students\04smithjo - we share the Students folder, not each individual user's folder.

  11. #11
    pooley's Avatar
    Join Date
    Sep 2005
    Location
    S Wales
    Posts
    1,129
    Thank Post
    77
    Thanked 118 Times in 99 Posts
    Rep Power
    66

    Re: Bulk folder Creation in Windows

    I wanted a script to actually create the students HOME folder, not really bothered about any sub folders that may need creating.

    Any suggestions or do I just buy some folder creation software and be done

  12. #12
    apeo's Avatar
    Join Date
    Sep 2005
    Location
    Lost
    Posts
    1,612
    Thank Post
    95
    Thanked 115 Times in 111 Posts
    Rep Power
    41

    Re: Bulk folder Creation in Windows

    This vbscript should work but not fully tested.

    Code:
    Dim oFS0, oFS1, oFolder, WshShell, strPath, CreateFolder
    Set WshShell = WScript.CreateObject("WScript.Shell")
    Set oFS0 = WScript.CreateObject("Scripting.FileSystemObject")
    'change get folder path
    strPath = "E:\Data\Users Home Directories\Students\"
    Set oFolder = oFS0.GetFolder(strPath)
    
    
    CreateFolders oFolder
    
    Sub CreateFolders(oF)
    
    Dim F
    
    	For Each F In oF.subfolders
    		'Create directories for each folder in the above path
    		Set oFS1 = CreateObject("Scripting.FileSystemObject")
    		Set CreateFolder = oFS1.CreateFolder(strPath & "\" & F.name & "\My Documents\ICT")
    		Set CreateFolder = oFS1.CreateFolder(strPath & "\" & F.name & "\My Documents\Science")
    		Set CreateFolder = Nothing
    		Set oFS1 = Nothing
    	Next
    
    End Sub
    
    'clean up
    set oFolder = nothing
    Set oFS0 = Nothing
    set wshshell = nothing
    EDIT:
    This doesnt check if the folder exist or not and will go through every folder in the students folder so be aware.

  13. #13
    apeo's Avatar
    Join Date
    Sep 2005
    Location
    Lost
    Posts
    1,612
    Thank Post
    95
    Thanked 115 Times in 111 Posts
    Rep Power
    41

    Re: Bulk folder Creation in Windows

    Quote Originally Posted by pooley
    I wanted a script to actually create the students HOME folder, not really bothered about any sub folders that may need creating.

    Any suggestions or do I just buy some folder creation software and be done
    So you want to creat multiple home directories with user details coming from a csv or something?

  14. #14
    pooley's Avatar
    Join Date
    Sep 2005
    Location
    S Wales
    Posts
    1,129
    Thank Post
    77
    Thanked 118 Times in 99 Posts
    Rep Power
    66

    Re: Bulk folder Creation in Windows

    yes m8 - got all user details in csv or if there is a way of interrogating AD and using the results from there I would use that too

  15. #15

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,341
    Thank Post
    624
    Thanked 1,584 Times in 1,421 Posts
    Rep Power
    414

    Re: Bulk folder Creation in Windows

    Pooley: Please start a new thread for your question as that doesn't appear to be what the original poster was after.

    Thanks,

    Ben

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Active Directory - Single and Bulk User creation and FREE!!
    By siuko in forum How do you do....it?
    Replies: 39
    Last Post: 20th June 2012, 11:29 AM
  2. Bulk user Creation
    By Jamie_a in forum Windows
    Replies: 10
    Last Post: 14th January 2009, 06:30 PM
  3. Bulk folder creation
    By richard in forum How do you do....it?
    Replies: 3
    Last Post: 5th November 2007, 02:04 PM
  4. Bulk User Creation Tools
    By mark in forum Downloads
    Replies: 16
    Last Post: 10th July 2007, 04:24 PM
  5. Bulk user creation
    By Dos_Box in forum How do you do....it?
    Replies: 63
    Last Post: 13th November 2006, 07:02 PM

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
  •