Darrell Burns
dhb at flsi.com
Fri Jun 24 10:50:51 CDT 2011
Here's a function that I use... Private Function VerifyFolder(path) As Integer On Error GoTo VerifyFolder_err Set fso = CreateObject("Scripting.FileSystemObject") Set Folder = fso.GetFolder(path) 'throws exception if folder doesn't exist VerifyFolder = True Exit Function VerifyFolder_err: Status_Msg "Folder does not exist: " + path, stMsgForm, 3 VerifyFolder = False End Function -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Thursday, June 23, 2011 9:03 PM To: Access Developers discussion and problem solving Subject: [AccessD] Does a directory exist? I've been playing around with the Dir() function but I can't figure out how to determine whether a directory exists, so I can create it if it doesn't. Followup question: can I create a directory called "C:\major\minor" if "C:\major" doesn't exist, or do I have to create "C:\major" first and then create "C:\major\minor"? TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com