HEELPBOOK - GeneratePath (VBScript function to create folders recursively) ######################### This function will generate / create a single folder (if the parent path already exist) or a complete path+folder if the absolute path doesn't already exist. Function GeneratePath(pFolderPath) GeneratePath = False If Not objFSO.FolderExists(pFolderPath) Then If GeneratePath(objFSO.GetParentFolderName(pFolderPath)) Then GeneratePath = True Call objFSO.CreateFolder(pFolderPath) End If Else GeneratePath = True End If End Function Example This example will create a complete path if test1...test8 will not exist... GeneratePath("C:\test1\test2\test3\test4\test5\test6\test7\test8\test9") ############ ARTICLE INFO ############# Article Month: November Article Date: 30/11/2012 Permalink: http://heelpbook.altervista.org/2012/generatepath-vbscript-function-to-create-folders-recursively/ Source: http://www.pcreview.co.uk/forums/create-folder-vbscript-t1469322.html Language: English View more articles on: http://www.heelpbook.net/ Follow us on Facebook: http://it-it.facebook.com/pages/HeelpBook/100790870008832 Follow us on Twitter: https://twitter.com/#!/HeelpBook Follow us on RSS Feed: http://feeds.feedburner.com/Heelpbook Follow us on Delicious: http://delicious.com/heelpbook Linkedin: http://it.linkedin.com/pub/stefano-maggi/27/73a/b20 Google+ : https://plus.google.com/116990277568167008289/posts