i got stuck in one place of my automation…where i am in “for each” activity and i have downloaded the image and saving the image by using the " type into" activity for path that is “C:\Users\A\Documents\7robots\image automation\after\1” i want last “1” as veriable so ican save image like 1,2,3,4,…in that folder. i have tried many ways but i am getting only one result that is 1 and its asking me to replace image…please help
- Initialize a Counter Variable: Before the “For Each” activity, use an Assign activity to initialize a counter variable. Let’s call it
Count
and set its initial value to 1. - Inside the “For Each” Activity: During each iteration of the “For Each” activity where you save an image, you can use the
Count
variable to construct the file name.
Assign: Count=1
For Each
"C:\Users\A\Documents\7robots\image automation\after\" + Count.ToString
Count = Count + 1
Hope this helps!!
Create an integer variable, let’s call it ImageNumber and set its initial value to 1. This variable will keep track of the image number.
Inside your “For Each” activity After downloading the image, you can use the “Type Into” activity to set the file path for saving the image. You need to construct the file path dynamically by appending the value of the ImageNumber variable.
In the “Type Into” activity, for the field where you specify the path, you can use an expression like this:
"C:\Users\A\Documents\7robots\image automation\after\" + ImageNumber.ToString
After saving the image, use an Assign activity to increment the ImageNumber variable by 1. Add this activity after the “Type Into” activity.
In the “Assign” activity, set the ImageNumber variable to ImageNumber + 1
thank you so…much…
" Assign activity to initialize a counter variable. Let’s call it Count
and set its initial value to 1." i was trying this same but my mistake was i was doing it in “for each” activity…thank you so much
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.