Today, i will discuss about “How to get filenames present inside the zip file without unzipping it”. Here, “Get file names” component will be used. See the below image for the same.
In Get File Names component, the value of file directory is set to zip://C:/data-integration/SALARIES.zip and wildcard is “.*“. Here the catch is “zip:” part . Click on show filenames.It will give you all file names which are present inside the zip file. See the below image for the same.
Run the transformation and see the Pentaho logs. Write to Log component will display the filenames. See the below data for the same.
Write to log.0 – ————> Linenr 1——————————
Write to log.0 – short_filename = FEB-SAL.csv
Write to log.0 –
Write to log.0 – ====================
Write to log.0 –
Write to log.0 – ————> Linenr 2——————————
Write to log.0 – short_filename = JAN-SAL.csv
Write to log.0 –
Write to log.0 – ====================
Write to log.0 –
Write to log.0 – ————> Linenr 3——————————
Write to log.0 – short_filename = MAR-SAL.csv
Write to log.0 –