+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 19
Windows Thread, Bult create folders within Folders in Technical; Hi All Heres a tricky one for you. We have some student record folders setup within a share. Folder names ...
  1. #1
    ceebster's Avatar
    Join Date
    May 2009
    Location
    The World
    Posts
    103
    Thank Post
    5
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Bult create folders within Folders

    Hi All

    Heres a tricky one for you.

    We have some student record folders setup within a share.

    Folder names are the students names.

    Our admin manager wants to put a new folder in each of these student folders and apply permissions to each folder for a particular group of users.

    I assume its going to be a script.

    Can this be done?


    Thanks in advance


    Chris

  2. #2

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,144
    Thank Post
    113
    Thanked 518 Times in 447 Posts
    Blog Entries
    2
    Rep Power
    121
    Quote Originally Posted by ceebster View Post
    Can this be done?
    Yes :-)

    If you give us a bit more of a clue about what you're trying to do then it may be easier :-)

    but as a start, let's assume that you have a top level folder called "students" and in that you've got "student1", "student2" etc and you want to put "new_folder" in each of these and give that folder the same access as the parent folder but also give write access to the group called "special_users"

    Let's also assume you can map to that top level folder as \\server1\students

    You can do this as a batch file:

    net use z: \\server1\students
    z:
    for /d %%i in (*) do md %%i\new_folder
    for /d %%i in (*) do cacls %%i\new_folder /e /g special_users:c

    - first 2 lines I hope are easy. Next line steps through each directory in turn and creates "new_folder" under it. Final line steps through the directories again and this time edits the permissions to add the special_users group

  3. #3
    SteveLaw's Avatar
    Join Date
    Jul 2008
    Location
    North East
    Posts
    91
    Thank Post
    17
    Thanked 4 Times in 4 Posts
    Rep Power
    12
    It can yes be done with a script, absolutely, but I haven't got one I can give you (and wouldn't want to just throw one together without testing). I'm sure someone has something similar somewhere.

    EDIT: There you go, as I was writing

  4. #4
    danrhodes's Avatar
    Join Date
    Sep 2008
    Location
    Wath Upon Dearne
    Posts
    1,513
    Thank Post
    157
    Thanked 181 Times in 150 Posts
    Rep Power
    67
    I would use a logon script something like...

    @echo off

    if exist "U:\ICT" goto end
    MKDIR U:\ICT
    CACLS U:\ICT /E /T /C /G "GroupName":F

    :end
    Exit


    So if a folder named ICT Exists in U: then the script terminates, if the folder does not exist then it will create the folder and set the permissions using cacls.

    D

  5. #5
    ceebster's Avatar
    Join Date
    May 2009
    Location
    The World
    Posts
    103
    Thank Post
    5
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Hi srochford

    Thanks!

    Sorry should of been more clear

    Folder stucture

    q:\common\STUDENT RECORDS\A-D\surname, firstname

    would like a folder called ECM creating in these folders - and assign a group for the RWX permmission

    The main student folders area created - need new folders created within this - could be tricky as would have to tell the script the name of the orginal folder and get it to go into each of these
    Chris
    Last edited by ceebster; 29th March 2010 at 10:30 AM.

  6. #6
    TechSupp's Avatar
    Join Date
    Mar 2007
    Location
    South Yorkshire
    Posts
    1,828
    Thank Post
    288
    Thanked 112 Times in 93 Posts
    Rep Power
    39
    Glad someone asked this, was wanting a similar thing. Not wanting to hijack the thread but could I aslo at the same time copy all the files except any existing folders in to the newly created folder (i.e. making a backup of their years work)?

  7. #7
    danrhodes's Avatar
    Join Date
    Sep 2008
    Location
    Wath Upon Dearne
    Posts
    1,513
    Thank Post
    157
    Thanked 181 Times in 150 Posts
    Rep Power
    67
    Quote Originally Posted by ceebster View Post
    Hi srochford

    Thanks!

    Sorry should of been more clear

    Folder stucture

    q:\common\STUDENT RECORDS\A-D\surname, firstname

    would like a folder called ECM creating in these folders - and assign a group for the RWX permmission


    Chris
    Do you map these folders to a Drive letter that would be easier to script if you do! are they the students home documents folders?

    D
    Last edited by danrhodes; 29th March 2010 at 10:33 AM.

  8. #8
    danrhodes's Avatar
    Join Date
    Sep 2008
    Location
    Wath Upon Dearne
    Posts
    1,513
    Thank Post
    157
    Thanked 181 Times in 150 Posts
    Rep Power
    67
    Quote Originally Posted by TechSupp View Post
    Glad someone asked this, was wanting a similar thing. Not wanting to hijack the thread but could I aslo at the same time copy all the files except any existing folders in to the newly created folder (i.e. making a backup of their years work)?
    Sorry, is that not what tape or NAS backup is for, seems a bit pointless to me does this!

  9. #9
    ceebster's Avatar
    Join Date
    May 2009
    Location
    The World
    Posts
    103
    Thank Post
    5
    Thanked 1 Time in 1 Post
    Rep Power
    0
    [QUOTE=danrhodes;488022
    This assumes though that the folder names are same as the username, otherwise you will ahve to use excel and conctenate to create a "mail merge" batch script using the exported fodler names!

    D[/QUOTE]

    Unfortuanlty the Admin staff have used the Students full names

    q:\common\q:\common\STUDENT RECORDS\A-D\Abbots, Joe
    q:\common\q:\common\STUDENT RECORDS\A-D\Adkins, Joe
    q:\common\q:\common\STUDENT RECORDS\A-D\Andrews, Joe

    I can get the exported usernames not sure about the last bit you said



    Cheers

  10. #10
    danrhodes's Avatar
    Join Date
    Sep 2008
    Location
    Wath Upon Dearne
    Posts
    1,513
    Thank Post
    157
    Thanked 181 Times in 150 Posts
    Rep Power
    67
    What are the folders used for, to store students work when they log on, are they there My Documents folders? Or do they just hold info about the students that Admin staff will be using?

    D

  11. #11
    ceebster's Avatar
    Join Date
    May 2009
    Location
    The World
    Posts
    103
    Thank Post
    5
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by danrhodes View Post
    Do you map these folders to a Drive letter that would be easier to script if you do! are they the students home documents folders?

    D
    These student record folders are mapped to a drive Q:\

    no they are not the students home documents folders


    Cheers

    Chris

  12. #12
    danrhodes's Avatar
    Join Date
    Sep 2008
    Location
    Wath Upon Dearne
    Posts
    1,513
    Thank Post
    157
    Thanked 181 Times in 150 Posts
    Rep Power
    67
    Ah right, if they aren't the home folders then it may be a slight more difficult. One way to do it would be to use Excel and concatenate and using the exported folder names using dir!

    See attached xls file.
    Attached Files Attached Files

  13. #13
    ceebster's Avatar
    Join Date
    May 2009
    Location
    The World
    Posts
    103
    Thank Post
    5
    Thanked 1 Time in 1 Post
    Rep Power
    0
    i can get that info - how do i add it into the script

    Sorry Scripting not my fortey!



    C

  14. #14
    danrhodes's Avatar
    Join Date
    Sep 2008
    Location
    Wath Upon Dearne
    Posts
    1,513
    Thank Post
    157
    Thanked 181 Times in 150 Posts
    Rep Power
    67
    just put it into the excel sheet attached the script you need will be at the far right, copy and paste that into notepad and you have your script.

    D
    Attached Files Attached Files

  15. Thanks to danrhodes from:

    ceebster (29th March 2010)

  16. #15
    TechSupp's Avatar
    Join Date
    Mar 2007
    Location
    South Yorkshire
    Posts
    1,828
    Thank Post
    288
    Thanked 112 Times in 93 Posts
    Rep Power
    39
    Quote Originally Posted by danrhodes View Post
    Sorry, is that not what tape or NAS backup is for, seems a bit pointless to me does this!
    No not pointless at all as yes we back up student folders with all their work but the co-ordinator just wants each pupils folders to be a little more organised so that they can see easily what work is completed in each year and the folder is not full of hundreds of files, just a few folders and the current years work.

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

Similar Threads

  1. Allow users create folders and shortcuts
    By RoboticGimp in forum Network and Classroom Management
    Replies: 3
    Last Post: 12th November 2009, 10:12 AM
  2. Create Bulk users and Folders
    By DanW in forum Scripts
    Replies: 14
    Last Post: 20th September 2009, 03:08 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
  •