Get a correlative number based on number of files on folders

I want to move files from one folder to another and use a nomenclature on each:
01-(number of files on folder + 1) - name of file

I’m using Google Drive, so I’m using Search for Files/Folders in order to find the number of bundles, and add 1.
It works but the problems is that my operations cost are adding up weirdly. It found 25 files on the folder and it added 25 operations. The Update module added 25 more operations. It was pretty heavy so I think it is a very bad technique. Imagine when there’s 1000 files…

Do you know another approach? I’m thinking on finding the file with the higher name (i.e.: 01-099) but I’m not sure. Maybe it works better.

Hey there,

if you only need the number of files in the folder, then aggregate the search module immediately and use the length of the resulting array. This will reduce the number of operations to 2 regardless of how many files are in the folder.