Icon

m_​015_​unzip_​keep_​original_​time

using R to extract ZIP Files and keep the original date and time intact

using R to extract ZIP Files and keep the original date and time intact

using R to extract ZIP Files and keep the original date and time intacthttps://forum.knime.com/t/unzip-files-node-doesnt-keeps-the-original-date-and-time-of-files/28147/6?u=mlauber71download the whole workflow group: https://hub.knime.com/mlauber71/spaces/Public/kn_example_r_zip_archiv~M9guutnmWfSzP8Pb/ library(utils)# the name of the original ZIP-file containing several different data typesv_zip_file <- paste0(knime.flow.in[["var_path_data"]], "file_with_times.zip")# where to extract the files tov_path_files_to_unzip <- paste0(knime.flow.in[["var_path_data"]], "extract from r - keep date-time/")# https://stat.ethz.ch/R-manual/R-devel/library/utils/html/unzip.html# setTimes = TRUE will make sure the original date and time is preserved !unzip(zipfile=v_zip_file, files = NULL, list = FALSE, overwrite = TRUE, junkpaths = TRUE, exdir = v_path_files_to_unzip , unzip = "internal", setTimes = TRUE) knime.out <- as.data.frame(v_zip_file) KNIME and R — installation across operating systems — some remarkshttps://medium.com/p/6494a2a498cc locate and create/data/ folderwith absolute pathsunzip files and keep date and time intactdata/file_with_times.zipvar_path_data Collect LocalMetadata R Source (Table) create zip file with multiple datatypes and different time stamps Java EditVariable (simple) using R to extract ZIP Files and keep the original date and time intacthttps://forum.knime.com/t/unzip-files-node-doesnt-keeps-the-original-date-and-time-of-files/28147/6?u=mlauber71download the whole workflow group: https://hub.knime.com/mlauber71/spaces/Public/kn_example_r_zip_archiv~M9guutnmWfSzP8Pb/ library(utils)# the name of the original ZIP-file containing several different data typesv_zip_file <- paste0(knime.flow.in[["var_path_data"]], "file_with_times.zip")# where to extract the files tov_path_files_to_unzip <- paste0(knime.flow.in[["var_path_data"]], "extract from r - keep date-time/")# https://stat.ethz.ch/R-manual/R-devel/library/utils/html/unzip.html# setTimes = TRUE will make sure the original date and time is preserved !unzip(zipfile=v_zip_file, files = NULL, list = FALSE, overwrite = TRUE, junkpaths = TRUE, exdir = v_path_files_to_unzip , unzip = "internal", setTimes = TRUE) knime.out <- as.data.frame(v_zip_file) KNIME and R — installation across operating systems — some remarkshttps://medium.com/p/6494a2a498cc locate and create/data/ folderwith absolute pathsunzip files and keep date and time intactdata/file_with_times.zipvar_path_data Collect LocalMetadata R Source (Table) create zip file with multiple datatypes and different time stamps Java EditVariable (simple)

Nodes

Extensions

Links