none
VBScript for setting up new Folder Structure

    Question

  • HI,

    I have a client who we want to set up a VBScript to create a new Job folder. Basically this job folder is going to have multiple subfolders which then have another lot of subfolders under them.

    I haven’t had much experience with VB Scripting so was hoping someone might be able to give me an idea on how to script this.

    Ultimately we would also like to have the script go ahead and apply differing NTFS permissions as well.

    The folder structure would roughly look like this;

    1. Folder 1
      1. Folder 1.1
        1. Folder 1.1.1
      2. Folder 1.2
        1. Folder 1.2.1
        2. Folder 1.2.2
      3. Folder 3
      4. Folder 4
        1. Folder 4.1
        2. Folder RFI#
      5. Folder 5
      6. Folder 6
        1. Folder 6.1
        2. Folder VO#
      7. Folder 7
        1. Folder 7.1
        2. Folder PC #
      8. Folder
        1. Folder 8.1
        2. Folder 8.2
      9. Folder 9
        1. Folder 9.1
        2. Folder 9.2
        3. Folder 9.3
      10. Folder 10
        1. Folder 10.1
        2. Folder 10.2
      11. Folder 11
        1. Folder 11.1
        2. Folder 11.2
        3. Folder 11.3
        4. Folder 11.4
        5. Folder 11.5
        6. Folder 11.6
    Monday, March 31, 2014 6:22 AM

Answers

  • I would suggest PowerShell is a better way to do this.

    Especially with NTFS permissions as well.

    PowerShell - New-Item http://technet.microsoft.com/en-us/library/ee176914.aspx

    PowerShell - Access Control List

    http://technet.microsoft.com/en-us/library/hh849802.aspx

    http://technet.microsoft.com/en-us/library/hh849810.aspx

    I recently finished a job where i  was hired to write a script to import 200 users from a CSV, added them to groups, setup folders from a CSV and created the ACLs.


    Robert Pearman SBS MVP
    itauthority.co.uk | Title(Required)
    Facebook | Twitter | Linked in | Google+

    Monday, March 31, 2014 12:33 PM
    Moderator

All replies

  • I would suggest PowerShell is a better way to do this.

    Especially with NTFS permissions as well.

    PowerShell - New-Item http://technet.microsoft.com/en-us/library/ee176914.aspx

    PowerShell - Access Control List

    http://technet.microsoft.com/en-us/library/hh849802.aspx

    http://technet.microsoft.com/en-us/library/hh849810.aspx

    I recently finished a job where i  was hired to write a script to import 200 users from a CSV, added them to groups, setup folders from a CSV and created the ACLs.


    Robert Pearman SBS MVP
    itauthority.co.uk | Title(Required)
    Facebook | Twitter | Linked in | Google+

    Monday, March 31, 2014 12:33 PM
    Moderator
  • Hi MorganHurkett,

    As Robert said, PowerShell will be a better way to do it. Please refer to Robert’s suggestion and check if can help you to solve this issue. Regarding to PowerShell, you will get a better assistance in PowerShell Forum.

    In addition. Regarding to script issue, I suggest that you would post your question in the Official Scripting Guys Forum. I believe we will get a better assistance there

    Best regards,

    Justin Gu

    Wednesday, April 2, 2014 2:26 AM
    Moderator