Can I change a file type using Property Calculator?

We import documents via Connection to external file source.
The files do not have a type / extention.
Instead the extention is found in an accompanying XML, so we use that to populate a Property.

Can we somehow bind the found property (ex. "PDF") to the Type?
Can we use the Property Calculator or any other tool to rename the file so the file's extention is added?

ex. d5aae826 becomes d5aae826.pdf

Parents Reply Children
  • hi Joonas, tested and no good result.

    the name of a real PDF when dragged to the desktop:
    3b354f24 (ID 457).pdf

    and the name using postfix:
    3b354f24.PDF (ID 206)

    Trying to find a way without using vbscript, do you have any other suggestions?

        Dim objFiles:         Set objFiles = Vault.ObjectFileOperations.GetFiles(objVer)
        Dim sFilePath:         sFilePath = "C:\tmp\" & objFiles(1).GetNameForFileSystem() & ".PDF"
        Call Vault.ObjectFileOperations.DownloadFile(objFiles(1).ID, objFiles(1).Version, sFilePath)

  • I can't think of any other way than custom development if you need to do the renaming after importing. Have you already checked that the renaming cannot be done before importing, either in the source system that is generating these files or with some Windows script in the file system before M-Files reads them in?