Unzip, zip file and the delete the zip

Hi,

Scenario to achieve - “I have downloaded some zip files to dynamically created folders(folder names were taken from an excel) and sub-folders, and now i have to go to the sub-folders and unzip the zip file and delete the original zip file from the respective path.”.

TIA

1 Like

For deleting zip file, use Delete Activity.

Regards,
Karthik Byggari

1 Like

Hi @indrajit.shah

if you don’t want external packages, you can also try Power Shell it works perfectly:

  • unzip: “Expand-Archive -LiteralPath C:\yourarchive.zip -DestinationPath C:\youruser\yourLocation”
  • zip: “Compress-Archive -Path C:\pathToYourFolder -DestinationPath C:\pathToYourNewArchive” ( for DestinationPath you don’t need to type “.zip”, it will be added automatically )

for delete you can use Delete Activity like @KarthikByggari said.

Hope this helps! :smiley:

1 Like

@Nikola_Drazic,
My path for zip will always be always dynamic.

and i never used these activities ever.

1 Like

@indrajit.shah you are storing that path in some variable, right? If so, just pass it in code like this for example: “Expand-Archive -LiteralPath ‘"+yourVariable1+"’ -DestinationPath ‘"+yourVariable2+"’”
or you can pass values like any other arguments (you can find that in properties panel).

notes:

  • if you try to use this, please check “isScript” property
  • please note that I’m using '" and not just " this is because if you have some blank space in your path it will not work with "
2 Likes

Let me try, as i a not sure of this, but still.

TIA

1 Like

I solved it.

Below is the work flow attached

Unzip_DeleteZip.xaml (7.4 KB)

1 Like

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

Here is the activity to do the zip and unzip with password.

Regards
Balamurugan.S