How to unzip files and move those unzip files to another folder

Hello all,

i am very much new to Uipath development . Right now i have a task . my task is -

i have two folder . One is Unzip folder and another is Zip folder . In my Zip folder i have zip files . now i have to unzip those files and unzipped files must be move to another folder name Unzip. after that zipped files will be deleted .

Please suggest me or give me the steps how to do this thing. Many thanks in advance

1 Like

Hi @roysupriya21

use this activity for unzip, it works very well for me

image

image

image

can you indicate which folder you want to unzip to

To delete files, make sure the attachment helps you

DeleteFile.zip (2,7,KB)

1 Like

thanks for your reply

i have attached my zip folder and content of zip folder .

1 Like

@roysupriya21
1.Use for each …
Directory.GetFiles(ZipFilesFolderPath,"*.zip")
2.Then use UnZip activity.
(Install this activity from manage packages…BalaReva.ZipUnzip.Activities)
In parameters pass ZipFile=Item.Tostring and your Extract folder path.
3.Then use delete file activity to delete zip files.
image

5 Likes

I found Invoke Power Shell activity very useful when working with zipped files. The good thing is there is no need to install any packages as it is a part of CoreActivities. All you need to do is to:
image

With the following parameters:


Properties:
image

10 Likes

Can you provide the flow for this one? This did not work for me at all and I am trying to avoid installing packages.

@Mitchell_Binder,

Check this xaml, it will extract files from a zip and place it in a directory. then from that directory it will get all the files.

I think i have replied to you in another post

UnzipFilesAndGetFiles.xaml (8.2 KB)

Hi Mitchell,

Here you have the workflow utilizing Invoke Power Shell activity with 3 arguments:

  • in_strZipFilePath
  • in_strOutputFolder
  • out_bSuccess (optional)

This works for files in .zip format, it does not for other compression formats e.g. .7z

UnzipFile.xaml (7.0 KB)

2 Likes