How to Save in a Folder Inside of Documents

HI all!

How can I save to a File in a folder that is inside of Documents folder?

I mean, this is the Way to save in Documents: dim ofile as FolderItem = SpecialFolder.Documents.Child(“Factura Ejemplo.pdf”)
Example. This folder is “AQUA”

So I need to save in: “Documents/AQUA”

And I don’t know if this possible to Create Folder “AQUA” if not exists after save.

Regards

Dim ofile As FolderItem = SpecialFolder.Documents.Child("AQUA") If Not ofile.Exists Then ofile.CreateAsFolder End If ofile = ofile.child("Factura Ejemplo.pdf")

Untested, but you get the idea.

HTH

Here are some simple examples to get you started:

If the folder exists:

dim ofile as FolderItem = SpecialFolder.Documents.Child("AQUA").Child("Factura Ejemplo.pdf")

If you need to create the folder first:

[code]dim f as FolderItem = SpecialFolder.Documents.Child(“AQUA”)
If Not f.Exists Then
f.CreateAsFolder
End If

dim ofile as FolderItem = f.Child(“Factura Ejemplo.pdf”)[/code]

And applies different to create a subfolder?

I do that:
Dim g As FolderItem = SpecialFolder.Documents.Child(“AQUA”).Child(“Emitters”)
If Not g.Exists Then
g.CreateAsFolder
End If

So, I want to do that now, If AQUA Exists then create Emitters Folder.

If Aqua doesn’t exist you’ll get a NilObjectError in the above.