Dan Waters
dwaters at usinternet.com
Sat Oct 18 12:30:04 CDT 2008
How about: Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") If fso.FolderExists("C:\One\") = False Then fso.CreateFolder ("C:\One\Two\Three\") Else If fso.FolderExists("C:\One\Two") = False Then fso.CreateFolder ("C:\One\Two\Three\") Else If fso.FolderExists("C:\One\Two\Three") = False Then fso.CreateFolder("C:\One\Two\Three\") End If End If End If fso.close Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav Sent: Saturday, October 18, 2008 11:14 AM To: Access Developers discussion and problem solving Subject: [AccessD] Creating SubDirectories Hey All I am wanting to allow the user to indicate a path (for file storage). The program checks to see if the path exists, if not it notifies the user that the path doesn't exist and would they like the program to create it. I can do this, but rather then reinventing the wheel does anyone know of a custom function that would loop through the path and create the necessary folders/directories. Eg. C:\One\Two\Three Directory One doesn't exist so create the full path. Directory One and Two do exist so create folder Three -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com