Working session.CreateDirectory example for VB.NET/VBA
I have been trying to find a detailed example in either VB.NET or VBA for how to use .CreateDirectory since I can't get it to work.
I can get the Upload example to work fine.
So best case scenario, I would like an example that includes:
Which object to declare?
My assumption is RemoteDirectoryInfo but I really don't know
e.g.
Dim newDir as RemoteDirectoryInfo
How to exactly specify the path. My relative path "/test/" works fine when uploading a file but fails when using
Set newDir = mySession.CreateDirectory("/test2/")
How can I implement error checking and confirmation similar to how it is done for uploads?
Uploads can use code like:
' Throw on any error
transferResult.Check
' Display results
Dim transfer As TransferEventArgs
For Each transfer In transferResult.Transfers
MsgBox "Upload of " & transfer.FileName & " succeeded"
Next
I would like to be able to do the same for checking if the directory was created before resuming the rest of the procedure.
Thankful for any help.
Regards,
Tom
I can get the Upload example to work fine.
So best case scenario, I would like an example that includes:
Which object to declare?
My assumption is RemoteDirectoryInfo but I really don't know
e.g.
Dim newDir as RemoteDirectoryInfo
How to exactly specify the path. My relative path "/test/" works fine when uploading a file but fails when using
Set newDir = mySession.CreateDirectory("/test2/")
How can I implement error checking and confirmation similar to how it is done for uploads?
Uploads can use code like:
' Throw on any error
transferResult.Check
' Display results
Dim transfer As TransferEventArgs
For Each transfer In transferResult.Transfers
MsgBox "Upload of " & transfer.FileName & " succeeded"
Next
I would like to be able to do the same for checking if the directory was created before resuming the rest of the procedure.
Thankful for any help.
Regards,
Tom