How to upload multiple zip files

Hii,
i want to upload multiple zip files on website
in this flow i am using Assign activity-
ZipFileLocation1=“C:\Users\Administrator\TruBot\POUpdateToSAP_Automation\Operational\TruCAP_Input”
and then using for each loop-
Item=Directory.GetFiles(ZipLocation1) then again using assgin activity-
FileName1=Path.GetFileName(Item.ToString)
and passing Filename1 this variable to select the files but it giving me errors

Hello,

FileName1=Path.GetFileName(Item.ToString), this will give you only file name, can you try passing the entire path?

JSF*.txt
ZipFileLocation1=“C:\Users\Administrator\TruBot\POUpdateToSAP_Automation\Operational\TruCAP_Input(filename)*.zip”
please try this

*.zip using this you can fetch all the zip files

but i am passing declaring one assgin variable that is zipfilelocation1
ZipFileLocation1=“C:\Users\Administrator\TruBot\POUpdateToSAP_Automation\Operational\TruCAP_Input”
and then using for each loop-
Item=Directory.GetFiles(ZipLocation1)

but sir i can’t give files becouse inside TruCap input folders multiple zip files is presnt

what is the zip file name starts from??which you want to use.

For example the name will be common know like abcd.zip etc

do this

Directory.GetFiles(“yourDirectory”,"*.ZIP")

mention only zip file name which you want to select or move it in to another location then give a try as i said above

If your issue is resolved please mark as a solution so other people could get help from the solution.
Thanks

look at this image i am changing as per all of your ideas but it doesn’t work

and which variable type can i select of for each activity

Mention the path ZipFileLocation1 variable in for each

Directory.getfiles(ZipLocation1) use and try this

Not directoryservices

it showing me directory is not declare

Just take the path you mentioned and concatenate the file name you have in Loop…

In the above assin activity, mention

ZipLocation1.tostring + “” + Path.GetFileName(item.toString)

Give the path instead variable

Sorry sir i am tring everything that you told me but it not working

check if there is any variable you created with the namePath delete it if any

Import the namespaces for System.IO

Change the variable scoping to the entire workflow so that they are accessible throughout the workflow

if no change in error, Suggest you to share the workflow and sample zip files.

1 Like