Unzip File from Download Folder

Hi all,

I downloaded a file into the download folder and now I need to unzip this file. The file name is always different. I tried to use Directory.GetFiles but it doesn’t work (see screenshot). Could somebody please help me?

Thanks in advance!

1 Like


You can place a Log message activity inside the For Each to check if you are passing the correct path of the file

Also you can use Extract / Unzip files activity


Hope this may help you


@Elena_Scha - please check this post…similar solution was provided for csv file…in your case change the file type to .zip and use the output variable in Extract/Unzip files activity.

Thank you, this post helped me unzip the file (see my solution below). Now I have the issue that the unzipped file I need is in another folder in csv format (together with the xml content type). The folder name, again, is always different. I saved the folder on my desktop.

How can I access this folder without knowing the name and take the csv file? I want to convert it to an excel file and save it on the desktop directly.

Many thanks!

1 Like

Hi Elena…Sorry I didn’t understood your problem statement clearly

I see you are able to unzip the contents…right? So after unzipping you would like to move the files inside the folder to somewhere else??

Yes, my zip file is now unzipped into a csv. The problem is that it unzipped the file into a folder (with a dynamic name). And I don’t know how to get the csv file inside the folder because I don’t know the folder name. Below pictures show the zip folder and the unzipped folder. So I want to open the unzipped folder and open the csv inside it (and save it in a xlsx. format)


Hope it’s clearer now. :slight_smile:

edit: please ignore that the folder names are different!

@Elena_Scha - When I have a chance to I will build the workflow starting from Downloading, Unzipping etc. until to convert the csv to excel…

That would be amazing!! I am really stuck here and can’t find a solution in the forum…

@Elena_Scha - Here you go…

Write Line = Environment.ExpandEnvironmentVariables("%USERPROFILE%\desktop") + "\" + Path.GetFileNameWithoutExtension(StrgetZip) + "\"+ path.GetFileNameWithoutExtension(StrGetZip) +".csv"

Read from CSV = Use the Same code from the write Line…

Hope this helps…

1 Like

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