Working with incremental Filenames

Dear All

This might look like a very simple thing to do, however excuse my lack of experience.

I am trying to create RPA on a web page.

The actions is to Print a page as pdf and go next.

The issue I have is with assigning filename in incremental order.

Example:
0001.pdf, 0002.pdf …

I tried with a numeric variable placing in loop, however It did not work out.

What are my other options?

Thanks in anticipation

Regards

Hi,

Assign a counter value to 1 before starting the loop while downloading save it as counter.pdf and increment the counter at end of iteration in the loop counter = counter+1 using assign activity.

Thanks,

1 Like

@Museec You need to format your number using
String.Format("{0:0000}.pdf",counterVariableName)

1 Like

Hi Pranneth

Thanks for your help.

I had to convert the counter to string and it worked. I used counter.tosrting to pass the value, this was my error all along.

Many thanks

Ranjeet

Thanks I will also try it out.

1 Like

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