Scripts Thread, VB Script to create folders in Coding and Web Development; Hi
The following works fine - we run it through GPO at logon:
ParentFolder = "H:\"
set objShell = CreateObject("Shell.Application")
...
-
26th April 2007, 01:19 PM #1
- Rep Power
- 0
VB Script to create folders
Hi
The following works fine - we run it through GPO at logon:
ParentFolder = "H:\"
set objShell = CreateObject("Shell.Application")
set objFolder = objShell.NameSpace(ParentFolder)
objFolder.NewFolder "Year 1"
to create folder 'Year 1' in the root of the users home area. What we would like to do is create a Year 1, Year 2, Year 3 etc folder in every home area so there is better file management as users move up the school. Other than using 6 scripts any ideas how to extend this script so it can add more than one folder?
Many thanks
-
-
IDG Tech News
-
26th April 2007, 01:38 PM #2 Re: VB Script to create folders
Just repeat the last line and substitute "Year 1" for whatever folder name.
matt
-
-
26th April 2007, 03:03 PM #3
- Rep Power
- 0
Re: VB Script to create folders
Or use a For loop.
For N = 1 to 7
objFolder.NewFolder "Year "+CStr(N)
Next
-
SHARE:
Similar Threads
-
By Norphy in forum Scripts
Replies: 5
Last Post: 20th April 2010, 11:37 AM
-
Replies: 13
Last Post: 8th November 2007, 03:53 PM
-
By ITWombat in forum Windows
Replies: 0
Last Post: 17th February 2007, 05:43 PM
-
By SwedishChef in forum Scripts
Replies: 15
Last Post: 5th July 2006, 08:14 AM
-
By tosca925 in forum Scripts
Replies: 3
Last Post: 12th October 2005, 12:04 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
-
Forum Rules