I need to upload say 200 zip file (which is specific location) one by one in one particular site (internet explorer). How can I do this? and in a case of if bot fails, how can I get track of my uploaded list?
Please check the above thread for the uploading files and for tracking the count a files that are uploaded by using the below steps:
Assign a count(int data type) variable with value as 1 and in the for each loop you can increment the count value.
Use the log messages activity and print the value of count and place that assign value just before the assign activity where the increment is being done.
If you wanted the file names you can simply place and log messages activity within the for each activity and try printing the file name. You can see all the logs in the studio output panel and also if you are running the bot from orchestrator then please check them in the log messages of the orchestrator.
Regards
-
You can use the ForEach File in Folder activity and provide the filepath where you stored those zipped files.
-
While uploading each file, upload the file name to an Excel sheet so that even if the bot fails at some point, it will exclude the files that are in the Excel sheet.
For eqch file in folder and you can move the uploded file to different folder
Cheers
Also a wee bit shocked you’re still using internet explorer
@Jeroen_van_Loon Yeah, my office still uses that.
@Anil_G you mean manually? or via code?
Via code
You have a move file activity as well…so once uploaded use move file and move it
Cheers
@vrdabberu Okay, that’s nice idea. If I have to continue then. how can I do? I don’t want to reupload same zip files. It will be tedious to manually check.
@Anil_G can you share some code how to do that?
Move file is one single activity…just pass the source and destination paths the file would be moved
Cheers
@Anil_G So, this will work as. Upload that zip file and move that zip file to another folder? it will do for all zip files? So, I have to make dynamic path of zip file?
Already you would be using a dynamic path to upload each file right so use the same dynamic path to move as well…if all files are in same folder then for each file in folder and currentfile.Fullname will give the path
cheers
When I click browse this prompt pops up and I then have to select the zip file one by one. After that I have to fill 3-4 fields as well like select dropdown menu and then click upload. I have to do this for all the zip files. I am confused how to do this via UiPath?
When I click browse this prompt pops up and I then have to select the zip file one by one. After that I have to fill 3-4 fields as well like select dropdown menu and then click upload. I have to do this for all the zip files. I am confused how to do this via UiPath?
@Samraat_Maharjan1, like @Anil_G mentioned,
-
First, move all the zip files to a folder, then iterate through all the files that you have.
-
Make an xaml file that has a sequence to upload the file.
-
Now invoke this xaml in the foreach.
-
Make sure you upload the file name in excel to keep track of what file you have uploaded so that u do not have to check if a file is uploaded to that location or not
So process would look like this
- For each file in folder activity with folder path where zip files are present
- Inside that loop your click and currentfile.fullname will give the location to file
- Then perform all your steps what are there inside loop only
- Now use move file activity with source as currentfie.fullname and destiantion as the folder where you need to move
Hope this helps
Cheers
@Anil_G Thanks for your advice. I used assign activity (files = Directory.GetFiles("My Path ") before for each. Inside which I used item and files variable to do my activity. I have successfully able to upload each zip files one by one. I now need to move those successfully uploaded files to another folder. I want to move files one by one. so that I can keep track of which are the files that have been successfully uploaded and bot won’t reupload same zip files. Can you give me input.
@BharathKamalapur Thanks for your advice. I used assign activity (files = Directory.GetFiles("My Path ") before for each. Inside which I used item and files variable to do my activity. I have successfully able to upload each zip files one by one. I now need to move those successfully uploaded files to another folder. I want to move files one by one. so that I can keep track of which are the files that have been successfully uploaded and bot won’t reupload same zip files. Can you give me input. Maintaining in excel looks tedious job. Can you suggest me any other way.
