Computer Learning Zone CLZ Access Excel Word Windows

The cure for boredom is curiosity. There is no cure for curiosity.

-Dorothy Parker
 
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Tips & Tricks

New Tips Added Weekly!
Click here to get on our Mailing List

   
 
VBScript

Create Subfolders

How to create subfolders if they don't exist.

In this tip you will learn how to create subfolders if they don't exist.

	Sub subCreateFolders(strPath)
		If Right(strPath, 1) <> "\" Then
			strPath = strPath & "\"
		End If
		strNewFolder = ""
		Do Until strPath = strNewFolder
			strNewFolder = Left(strPath, InStr(Len(strNewFolder) + 1, strPath, "\"))
			If objFSO.FolderExists(strNewFolder) = False Then
				objFSO.CreateFolder(strNewFolder)
			End If
		Loop
	End Sub
	

You can now call this with a Folder path.

	Call subCreateFolders("D:\599CD\Downloads\vbs\")
	

And the folders will be created if they don't already exist.

 

Alex Hedley (Avatar) By: Alex Hedley


Click here to sign up for more FREE tips

 

 

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2023 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 11/28/2023 8:23:31 AM.