This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Mar 22, 2016, 8:19 PM
21 Posts

Help with mkdir

  • Category: Application Development
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags:
  • Replies: 2

I just don't understand why I cannot create directories on local windows PC,  using MKDir for validation.. or var = dir(somepath,16)can anyone help?
​I'm trying to export emails as eml files ( done!) but I wan't to export them in a folder scheme like they are entered into Notes Folders.
​What is happening, on the first loop, if the directory doesn't exist, it's created, but on the second loop, the directory already exists and it all goes sideways..

Idea's anyone?


Sub makeTheDirectories (folderName As String, expdir As string)
'in this case example to work for you:

foldername = "issues\Notes\clients"  ' or can be "Inbox" or "Issues\windows" (has to work in all three scenarios)

expdire = "C:\Users\%userProfile%\Documents\MailExport"

 Dim tmp_array As Variant
 Dim tmp_size As Integer
 Dim count As Integer 
 Dim workdir As string
 
 tmp_array = Split( folderName, "\")
 tmp_size = UBound(tmp_array)
 
 ChDir ( expdir ) 
 count = 0
 While (count <=  tmp_size )
  MkDir( tmp_array(count))  ' <<< Craps out here if the directory already exist.
  workdir = workdir + tmp_array(count)
  ChDir (workdir)  
  count = count + 1
 Wend
  
End Sub
 

 

Apr 1, 2016, 3:52 PM
21 Posts
that's what i ended up doing

on error resume next....

 

thanks


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal