Skip to main content
Solved

Reading files in zipped files without ZIP extension ?

  • Nov 5, 2026 1:45 PM UTC
  • 7 replies
  • 118 views

lifalin2016
Influencer
Forum|alt.badge.img+42

Hi all.

I was wondering whether it’s possible to get FME to read files inside a ZIP, that doesn’t use the ZIP extension, but is a zip file ?

Many software packages utilize ZIP, including FME itself, to store groups of files.

I’m trying to read QGIS project files, and the QGZ extension is a zip file containing QGS files. But FME rejects all QGZ notation when used in place of zip.

C:/my/path/my.zip/**/*.qgs works fine, but

C:/my/path/my.qgz/**/*.qgs does not.

Is there a tweak to accomplish that ?

Cheers

Best answer by lifalin2016

Thanks ​@hkingsbury  and ​@geomancer 

The problem is, that I don’t want copied temporary files if I can help it.

I did use the “copy” method initially, but found a better and more slick way - using symbolic links.

Before attempting to read “C:/my/path/myfile.qgz”, I create a symbolic link (mklink /H) named “C:/my/path/myfile.qgz.zip”, and use that instead of the original path.

Then after reading the embedded QGS file, I just need to delete the symbolic link.

This of course requires permission to do so, but usually that’s not a problem.

Cheers

View original

7 replies

hkingsbury
Celebrity
Forum|alt.badge.img+73
  • Celebrity
  • Nov 5, 2026 6:34 PM UTC

I’m not sure if there is a way to ‘trick’ the reader into it, but what i’d consider would be using a systemcaller before reading the file and making a copy of it and renaming the extension to ‘.zip’


geomancer
Evangelist
Forum|alt.badge.img+71
  • Evangelist
  • Nov 6, 2026 8:54 AM UTC

Maybe the custom transformer ZipExtractorAnyExtension from FME Hub can be of help here..


lifalin2016
Influencer
Forum|alt.badge.img+42
  • Author
  • Influencer
  • Best Answer
  • Nov 11, 2026 8:37 AM UTC

Thanks ​@hkingsbury  and ​@geomancer 

The problem is, that I don’t want copied temporary files if I can help it.

I did use the “copy” method initially, but found a better and more slick way - using symbolic links.

Before attempting to read “C:/my/path/myfile.qgz”, I create a symbolic link (mklink /H) named “C:/my/path/myfile.qgz.zip”, and use that instead of the original path.

Then after reading the embedded QGS file, I just need to delete the symbolic link.

This of course requires permission to do so, but usually that’s not a problem.

Cheers


redgeographics
VIP
Forum|alt.badge.img+64

Late to the party, but have you tried renaming the file (ren) with a SystemCaller instead of copying it? (This may mess up any other application relying on the file, so if you do, you may want to rename it back once you’re done with it)


geomancer
Evangelist
Forum|alt.badge.img+71
  • Evangelist
  • Nov 11, 2026 9:04 AM UTC

Interesting solution!

For the record: with ZipExtraxtorAnyExtension there is no need to store (and remove) temporary files. Just add a TempPathnameCreator before ZipExtraxtorAnyExtension. TempPathnameCreator creates a temporary path for all folders and files, and this temporary path is deleted when the workspace finishes.


hkingsbury
Celebrity
Forum|alt.badge.img+73
  • Celebrity
  • Nov 11, 2026 7:02 PM UTC

Interesting solution!

For the record: with ZipExtraxtorAnyExtension there is no need to store (and remove) temporary files. Just add a TempPathnameCreator before ZipExtraxtorAnyExtension. TempPathnameCreator creates a temporary path for all folders and files, and this temporary path is deleted when the workspace finishes.

Yea, the temppathnamecreator is pretty unrated in situations like this. It’s an entirely FME managed directory that gets wiped as soon as the FME process finishes


arnold_bijlsma
Enthusiast
Forum|alt.badge.img+16

​@lifalin2016 

Safe have created an “Archived Directory and File Pathnames Reader” in FME 2026.3 which I think does exactly what you want:

(as a very quick text, I zipped two XML files in a zipfile and renamed it .qgz)

Archived Directory and File Pathnames Reader Parameters