You are viewing limited content. For full access, please sign in.

Question

Question

workflow saving file to network folder

asked on May 10, 2021

I am stuck trying to create a workflow to save images(jpg) uploaded through a LF Form to a shared folder on our network. I found the following page but was wondering if there was a built in LF module to handle this?

https://answers.laserfiche.com/questions/148898/Workflow-to-Export-Document-to-Windows-Folder#166205

 

0 0

Replies

replied on May 11, 2021

Hola Víctor,
Este script pueda serte útil "Visual Basic .net"

Imports DocumentProcessor83
Imports LFSO83Lib
Imports Microsoft.VisualBasic

Namespace WorkflowActivity.Scripting.ExportaContenidoContigenciaDirectorio
    Public Class ImportarArchivo
        Inherits SDKScriptClass83
        Protected Overrides Sub Execute()

           Dim StrOrigen       as String     = TokenReplace("%(ID Documento)")
           Dim StrDestino      as String     = TokenReplace("%(Destino)")
           Dim LgcError        as Boolean    = False
           Dim StrError        as String     = "NO"
           Dim LgcConexion     as Boolean    = False
           Dim objContenido    as LFDocument = Database.GetEntryById(StrOrigen)
           Dim StrNmbContenido as String     = objContenido.Name.ToUpper
           Dim StrComillas     as String     = """"
           If StrNmbContenido.IndexOf(".PDF") <= 0 Then StrNmbContenido = StrNmbContenido & ".PDF"
           StrNmbContenido = Replace(StrNmbContenido, "Á", "A")
           StrNmbContenido = Replace(StrNmbContenido, "É", "E")
           StrNmbContenido = Replace(StrNmbContenido, "Í", "I")
           StrNmbContenido = Replace(StrNmbContenido, "Ó", "O")
           StrNmbContenido = Replace(StrNmbContenido, "Ú", "U")
           StrNmbContenido = Replace(StrNmbContenido, "Ü", "U")
           StrNmbContenido = Replace(StrNmbContenido, "Ñ", "N")
           StrNmbContenido = Replace(StrNmbContenido, "°", ".")
           StrNmbContenido = Replace(StrNmbContenido, ",", " ")
          '-------------- Inicia Exporta el contenido al disco local --------------
           ' Instancia el nuevo documento
           Dim DocEx As New DocumentExporter
           ' Configura propiedades del contenido origen
           DocEx.SourceDocument = Database.GetEntryById(StrOrigen)
           ' COnfigura el formato del contenido destino
           DocEx.Format = Document_Format.DOCUMENT_FORMAT_ELECTRONICFILE
           ' Exporta el contenido
           StrDestino = StrDestino & StrNmbContenido
           DocEx.ExportToFile(StrDestino)
           Try
            DocEx.ExportToFile(StrDestino)
            Catch ex As System.Runtime.InteropServices.COMException
            LgcError = True
           End Try
           If LgcError = True
            StrError = "Error --> Comando DOS " & StrError
           End If
           SetToken("%Error", StrError)
        End Sub
    End Class
End Namespace

1 0
replied on May 10, 2021

There is no built in export module, only import. We often use this workflow export extension from qfiche. There is a free trial and they have great support.

http://qfiche.com/products

0 0
replied on May 13, 2024

Hello Chad,

Thanks for the answer. Pls can you assists with guides. I have downloaded the trial version of Qfiche Export Document and Export Folder COntent. My scenario is this: I want to automate the export of documents from Laserfiche repository to a network folder automatically such that as a document is imported into a folder, its is automatically exported out.

I was able to use it to export a specific document but not all documents that come into a folder. Is there a way to achieve this?

 

The Qfiche Export Folder content tools allows you to export documents out of a folder but how can i set this up. Please  I will appreciate your help.

0 0
replied on May 13, 2024

Ade,

From your scenario I am going to assume that you are monitoring a specifc folder or set of folders in the repository and that you are exporting the documents out of the repository into a single network folder. 

If that is correct then my suggestion is to use the Document Export custom workflow activity versus the Folder Export activity.  

For your scenario you will create a simple workflow containng the Document Export activity and then create a rule (or rules) that trigger the workflow when a document is created and/or moved into the repository folder(s).

I can follow up with detailed instructions via email if you have questions.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.