"Unzip Files" node doesn't keeps the original date and time of files

Hello everyone,

I’m prototyping an ETL process and would like to grab the date & time of unzipped files using the “File Meta Info” node, however, the “Unzip Files” node changes the original timestamp. Are there ways to workaround this behavior? If not, I would love to have a checkbox to keep or not the original timestamp within the “Unzip Files” node options dialog.

Thank you in advance!

1 Like

Hello @caiocco,

and welcome to KNIME Community!1

There is no workaround for Unzip Files node. However you could use External Tool (Labs) node to do this with command/script which will preserve original timestamp. Check also provided example on same link.

Additionally I have opened up a ticket to implement this option. (Internal reference: AP-15436)

Br,
Ivan

2 Likes

Thank you very much! I will evaluate the indicated node and I’m also thinking about using a Python snippet.

1 Like

here is an example how to use R to unzip data. There might be a setting that would allow to keep the original dates.

2 Likes

What about something like this and bring it back together. Extract the original date from the zipfiles.
bring

2 Likes

@caiocco I checked the R unzip command and it offers the possibility to keep the original date and time stamp. You could check out this example here (you would have to download the whole workflow group).

2 Likes

Wow, mlauber71! Thank you again! I will test the workflow as soon as possible!

1 Like

You are welcome. You will have to install R and connect it to KNIME. I have a meta collection to help you with that.

1 Like

Hello,

so seems there are couple of workarounds :slight_smile:

Nice one with List Files node @Daniel_Weikert :+1:

Br,
Ivan

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.