Reading from a Zip File
FME can read file or folder datasets stored in a compressed (zip) folder. Upon being read, the data will be extracted and used just as if it were a normal dataset. FME is able to read data stored directly in a zip file, or within a top-level sub-folder.
Defining a zipped dataset to be read is as simple as selecting that zip file from within any of FME’s dataset selection tools.
For example, when adding a reader:
- Select the Format.
- Click the Browse button to open the file browser. In the bottom right of the file browser, select Zip Files from the filter list.
- Select the zip file in the file browser and click Open to add the dataset to the reader:
Note: If the file extensions inside the zipped folder are different (for example, png and
PNG), include \*.* to open all of the files within the folder. For example, C:\ZIPSTER\zipster.zip\*.*
Note: If the files you wish to open are in a folder nested within a top-level folder, include \**\ to navigate to the next folder. For example, C:\ZIPSTER\*.zip\**\*.shp
- Click OK to add the reader to the workspace.
Usage Notes
- If the format is set, it is not necessary to select individual files from inside the zip file. FME will know which files to read based on the file extension related to the chosen format.
- While it is possible to write zipped datasets using the Generic writer, it is not possible to read them using the Generic Reader with the format set to Guess format name from Extension.
- Reading from a password-protected zip file is not currently supported.