Decompress all files in directory

Hi everyone,

I have compressed folders in a directory that I want to decompress. However with the decompress files node I can just decompress one specific folder not all fodders in the directory.
Do you have any idea how to decompress all of them?
image

Cannot test it right now, but can you try and use List Files/Folders node to get the path to all files, use table row to variable loop start to turn each row into a variable iteratively, then use that variable in Flow variable section to define the source:
Structure:

Decompress Files Config:

You may also have to pass in a location to determine the location to decompress into - hope this can help get you started.

1 Like

Hi Martin,

thanks for your help!

It worked and the decompressed files are in my folder now. However the end loop node is not turning green. Do you know how to fix that?
image

Well on the picture you shared the Decompress Files node is showing an Error - in that situation the Loop End also won’t show green. What does the error say?

Maybe you executed a second time and are now getting errors because folders and files already exist?

1 Like

Hi Martin,

no I extra deleted the folder the second time. The weird thing is that it works right and creates the files and folder, but it shows an error in the workflow.

I think it needs to be the Loop end node as if i seperate them the Decompress node is “green”. When I connecte them the error message displays:

image

@MartinDDDD you need to close the loop. The variable loop end might be an idea.

1 Like

Agree - it looked closed in the first screenshot shared (Variable Loop End) - using Loop end should be OK as well.

@miriamgurk The screenshot with the “error” actually just shows the normal warning that you get in the configuration dialogue whenever you control a setting via flow variable. Can you try and execute after connecting? If Decompress Files node shows an error again, can you “hover” over it and share a screenshot or the text of that error?

@MartinDDDD thats the text i got:
image

Can you check that there are indeed only compressed files in that folder? It sounds like there is one file or maybe even a folder that is passed to the node and there it fails to decompress.

You can also click on the Table Row to Variable Loop Start Node and select “Flow Variable” at the bottom. That should show the file path to the file/folder causing the error.

3 Likes

Thanks a lot @MartinDDDD !

I got it working. I think the problem was that there was one uncompressed file in the input folder.

1 Like

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