From a zip Folder , How to extract one specific file , not the entire files in the zip folder

Hi Bot Makers,

Can any one help me with !
I have a zip folder in which i have couple of files lets say a.csv, b.csv, c.txt, d.xlsx
Now i want to extract only a.csv …
Any suggestion or knowledge would be great !


hope this thread would help you

Cheeers @SyedShabaz03

Thanks Buddy !

But above Solution will unzip the entire folder ! and extract all files , I want only one specific file to be extracted from a zip folder but not all the content in zip folder.

1 Like

oncee after unzipping we can use this expression in the assign activity so that we will be getting only the specified files
arr_filepath = Directory.GetFiles("'yourfolderpath","*.csv") //if csv file
arr_filepath = Directory.GetFiles("'yourfolderpath","*.pdf") //if pdf file
arr_filepath = Directory.GetFiles("'yourfolderpath","*.xlsx") //if excel file

where arr_filepath is a variable of type array of string
–now use a FOR EACH loop and pass the above variable as input and change the type argument as string in the property panel of for each
–inside that we can access file by mentioning the item.tostring as input for file path

Cheers @SyedShabaz03

If I am not wrong from above “unzipping” means extracting the entire content inside of a zip folder correct ?.. If correct then I don’t want all the files … I just want one file …
let’s say name of zip file is which contains a b c
I don’t want to extract all of them, while unzipping itself I just want one desired be extracted (a) from that to my destination .

Is this possible ?


I hope its not possible even when while doing it manually
so does the same with uipath
–we can unzip it as a whole and get the needed file from it with the above suggested method of directory.getfiles method and then zip that again

Cheers @SyedShabaz03

Hi @SyedShabaz03,

This can help you. (30.1 KB)


Thanks Balu,
I tried opening your Xaml but it says "Error detecting project version "

Let me check this by editing the JSON

can you post the error screen…?