[AccessD] FS object

Mitsules, Mark S. (Newport News) Mark.Mitsules at ngc.com
Tue May 4 15:48:26 CDT 2004


Yikes!  ...but your error handler works;)


Mark



-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com] 
Sent: Tuesday, May 04, 2004 4:43 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] FS object


yes, but have you tried directly creating a multi-level path?

John W. Colby
www.ColbyConsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Mitsules, Mark
S. (Newport News)
Sent: Tuesday, May 04, 2004 4:30 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] FS object


I just happened to do that since I'm currently working on that deployment
issue:)  You might recognize the error handler look & feel:)

Mark

'.Comments  : Creates folder.
'.Parameters: Full path.
'.Sets      : N/A
'.Returns   : True or False
'.Created by: Mark Mitsules
'.Created   : 5/4/2004 2:50:42 PM
Function fCreateFolder(strFolder) As Boolean
On Error GoTo Err_fCreateFolder
   Dim oFSO As FileSystemObject
   Dim oFldr As Folder

   Set oFSO = CreateObject("Scripting.FileSystemObject")
   Set oFldr = oFSO.CreateFolder(strFolder)
   fCreateFolder = True

Exit_fCreateFolder:
On Error Resume Next
   If Not (oFldr Is Nothing) Then Set oFldr = Nothing
   If Not (oFSO Is Nothing) Then Set oFSO = Nothing
Exit Function
Err_fCreateFolder:
      MsgBox Err.Description, , _
      "Error in Function modClientInstall.fCreateFolder"
      Resume Exit_fCreateFolder
   Resume 0 '.FOR TROUBLESHOOTING
End Function




-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Tuesday, May 04, 2004 4:24 PM
To: AccessD
Subject: [AccessD] FS object


Does anyone know if the file scripting object has the ability to just create
a directory path directly?  If I try to create (for example) C:\Test\Backup
and c:\test exists, then it creates Backup underneath it.  However if Test
doesn't exist it just errors.  I am going to have to build a function to
parse the directories and build them up one at a time if the FS object can't
directly do this.  It seems like a natural but I can't find it.

John W. Colby
www.ColbyConsulting.com


--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list