How to open a zip file, then copy some files, paste it into the desired path?

I am downloading a report from a website, it is a zip file and will be downloaded into my “download” folder, I want to open the file, then move only the selected two files into the new path folder that I have created.

The name of the file is always the same for the beginning, the only difference would be the date that follow.

@kian.ng,

Use Extract/Unzip Files activity to just unzip the files to a folder and from that folder you can use Move Files activity to move the files to desired location.

Thanks,
Ashok :slight_smile:

Hey @kian.ng use these two activity.
Zip/Unzip Activity

and After Unzip Use Move File Activity
Cheers Happy Automation

The file I am trying to extract is different each week, under the “File to extract” activity, I have put a * on the name of the file as it is different each week but it is throwing me an error message saying that the file name is incorrect?

Hello @kian.ng

You could parse the FileInfo output from the download activity and then get the name by typing:

fi_File.FullName

Regards
Soren

Also, I would need to use the path that could be use for multiple user rather than just my folder, the “THIS ONE HERE” on the below will be different depending on the userid, how do I set it up?

“C:\Users\THIS ONE HERE\Downloads\firms_new_*.zip”

Hi @kian.ng

Can you try below

InputFolder = Directory.GetFiles("C:\Users\" + Environment.UserName + "\Downloads", "New folder*.zip").FirstOrDefault()
DestinationFolder = "C:\Users\lrtetala\Desktop\DestinationFolder"

Sequence18.xaml (16.3 KB)

Regards,

What does it mean?

@kian.ng

I’ve made some changes try below

Sequence18.xaml (17.6 KB)

Regards,

@kian.ng

The image shows a user interface for extracting or unzipping files, with fields for the file to extract, destination folder, and an option to extract to a dedicated folder. (Captioned by AI)

Regards,

the action has been completed successfully on UiPath but nothing was extracted?

@kian.ng

Did you change the if condition??

Regards,

I did, I changed the “AAA” to the start name of the file I wanted to move

@kian.ng

Can you try to run the bot in Debug mode and check and if possible share your xaml
Share the file names and if condition

Regards,

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