
How do i make a flow that
for each subfolder
loop
looks inside counts how many files there are and creates folders accordingly
so if a folder has 100 images it will create folder "1"
if a folder has more than 100 but less than 201 it will create a second folder named "2" and put the first 100 files in 1 and rest to 2.
Btw each folder ends with xxx photo
xxx - could be any number from 1 to ∞
so maybe i could use read info?
any help would be great
Get folders * to %Subfolders%
For each %Folder% in %Subfolders%
Get files from %Folder% to %Files%
Set variable %TempNumber% as %Folders.Count - 1% ‘this is important for the next step
Set variable %CalcNumber% as %TempNumber / 100% ‘this will give a 0.something for 99 and under, and a 1.something for 100-199, etc.
Truncate (or Trim, can’t remember) %CalcNumber% to integer only and save as %TempFolder% ‘this doesn’t round, it just removes the decimal places.
Set variable %FoldersNeeded% as %TempFolder + 1%
Loop 1 to %FoldersNeeded% increment of 1
Create subfolder named %LoopIndex% in %Folder%
End(Loop)
End(For each)
for an example of the 4 step math process, we will try 100 and 101 for example.
for 100
we minus 1 to get 99
Divide by 100 to get 0.something
truncate to get 0
add back 1 to get 1
for 101
we minus 1 to get 100
divide by 100 to get 1
truncate will still be 1
add 1 to get 2
the loop will add a folder for each loop number up to %FolderNumber%.
good luck!