Automatic uploads from m-files

Hello

Is there a way to automatically download files from m-files to a folder on the server when a specific workflow state is reached?

(We use M-files Desktop)

Parents
  • Can be done in a script. Something like this should work

    Option Explicit
    Dim objFiles
    Set objFiles = Vault.ObjectFileOperations.GetFiles(ObjVer)
    Dim intCount
    Dim intRemainingFilesCount : intRemainingFilesCount = objFiles.Count
    Dim szName, szID, szVersion, szPath
    For intCount = 1 To (intRemainingFilesCount)												
    		Set objFile = objFiles.Item(intCount)
    		szName = objFile.GetNameForFileSystem()
    		szID = objFile.ID
    		szVersion = objFile.Version
    		szPath = "E:\MFiles\Temp" & szName	' Target path, must be present on the M-Files server
    		Vault.ObjectFileOperations.DownloadFile szID, szVersion, szPath
    Next

  • Can you tell me how I can run a file using vbscript? I was able to save the files in the server folder and move them to another folder where users have access, but to do this I need to run a .bat file. Would it be possible to run this .bat file with vbscript?

Reply Children