How do I add a number values to file names for similar files

I have separate reports that I need to keep track of for the month. They are separate files that contain the same data but for different weeks of the month. I want to name them like this “filename1” “filename2” “filename3” “filename4” and so on.

My question is - how do I create a variable to add the number value to the file name and increase it every time?

Let N be an Int32 value representing the number of files you want to save, andMyDir be the string variable containing the path where the files are to be saved.

1.) Initialize N to the number of files you want to name, and Ix to 1.
2.) Add a While activity with condition Ix <= N.
3.) Use a copy or move activity to move the file from one directory with destination String.Concat(MyDir, "\filename", Ix.ToString).
4.) Use an assign statement to set Ix to Ix + 1.