Question

Adding more archive file format extensions

  • 16 September 2022
  • 1 reply
  • 2 views

Badge +5

Hi,

 

I am using FME Desktop 2019.2 64bit so cannot use the esri layer file reader (I am not sure this would give me the info I am after anyway as I want to interrogate the data source).

 

I want to open an xml file within the .lpkx file to get the data sources from it (these are all buried in Portal with no way to get that detail using the Rest API - it seems). I have found them on the file system. Now I know I could use some python to unpack it - but using command line and 7-zip (or maybe one of the transformers on FME Hub) but didn't really want that extra step and then delete the unpacked version afterwards.

 

So I guess my question is: Is it possible to change some configuration file in FME itself to recognise .lpkx as an Archive file? If so I would also need to do this for FME Server. This is probably not an ideal solution and the safest would be to just unpack it, then delete it afterwards?

 

Kind regards

 

John


1 reply

Userlevel 3
Badge +16

I don't know if there is a setting to recognise other file types as archives files. There are quite a lot of formats which are actually just zip archives (docx, xlsx etc), I find it's easy to just rename the file to .zip when you need FME to read specific files within.

So, use a TempPathnameCreator and filecopy FeatureWriter to rename it to a temp .zip, then a FeatureReader to your pathname.zip\\folder\\datasource.xml will be able to read the xml within it.

Reply