Deep Importing a folder with custom folder type and custom doc type

Options

Hi,

I am looking for a simple code to Deep Import a folder with custom folder type and custom doc type in bulk.
We have more than 4000 folders with subfolders and documents in each folder and subfolder.

Please provide me the best approach along with a code sample with as much details as possible.

Note: I am looking at the forum discussions, but I could not figure it out how exactly I can do so. I am confused.

Thank you
Ashok

Comments

  • Even if you give me a simple draft code that would be helpful.
    I can run the code one time.

  • I answered your question in your other thread. Please do not cross post - its bad forum etiquette.

  • Thank you Johnny.
    I am looking at DFC 7.3 Javadocs.
    The sample code is in docbasic language (I need to convert it to Java).
    The code also refers to XML Application which I am not sure how it looks like for Importing a folder into docbase.

    Do you have any idea?

    IDfImportOperation performs a complete client import of one or more nodes. This includes detecting compound file references, creating new docbase objects for top level and referenced files, uploading content files to the server, performing the initial save, and cleaning up local content files. Note that compound references to existing docbase objects (e.g. through XML links) will cause those existing objects to be checked in as part of the import operation. Note that you MUST specify a session using the setSession() method prior to adding any objects to the import operation. You should also set the destination cabinet or folder using the setDestinationFolderId() on either the operation as a whole or nodes individually. Either an IDfFile or a file path specified as a string may be added to the import operation. When importing XML content, you may specify the name of the XML application to apply to the XML content. The XML application defines the configuration rules to be applied to the XML, such as how the content will be broken out into docbase objects, the relationships between XML content chunks, etc. The automatic processing of XML content based on XML application configuration was added in DFC 4.2. Earlier versions of DFC do not have this capability. Here is one example of how to import an XML document:

    ' Construct the operation and create a
    ' cast to the import operation interface.
    '
    Dim operation As IDfOperation
    Dim importOperation As IDfImportOperation
    Set operation = clientX.getOperation("Import")
    Set importOperation = operation

    ' Establish the docbase session for the import operation to use.
    '
    Call importOperation.setSession(session)

    ' Setup the file path for the file to import.
    '
    Dim myXMLFile As IDfFile
    Set myXMLFile = clientX.getFile("C:\mydoc.xml")

    ' Add the XML file to the import operation.
    ' Create a cast to the import node interface.
    '
    Dim node As IDfOperationNode
    Dim importNode As IDfImportNode
    Set node = operation.Add(myXMLFile)
    Set importNode = node

    ' Specify the XML application to use in processing this XML
    ' instance. Note, this could also be accomplished through
    ' a processing instruction in the XML content itself.
    '
    Call node.setXMLApplicationName("MyXMLApplication")

    ' Execute the operation.
    '
    If (operation.execute() = False) Then
    '
    ' Error hanlding code goes here. Use operation.getErrors() to
    ' get an IDfList of operation errors back.
    '

    End If

    Thank you.
    Ashok

  • If you continue to cross-post, I will stop answering your questions!

  • sorry