Is there a way to "control" when to move to the next item in a collection?
Scenerio: I have 6 files, and 3 directories.
I want to place 2 files in each directory.
It does not look like I could use a nested foreach loop.
Here is a pseudo of what I had in mind.
I'll take pseudo code as answer as well, or other suggestions. Thanks.
foreach(FilesInfo file in myFilesCollection)
if(counter == MaxFilesPerFolder)
currentFolder = DirectoryInfo.GetNext();
counter = 0;