Moving files and create directory at same time
<p>I am generating some files (simplified version)</p>

<pre><code>private static void GenFiles(int numbersToGenerate, string directory)
{
    for (int i = 1; i &lt;= numbersToGenerate; i++)
    {
        string fileName = Path.Combine(directory, "File" + i);
        File.Create(fileName);
    }
}
</code></pre>

<p>Now i am told "Generate 100 files and Create 10 Folders(Folder1-Folder2-Folder3 etc..)place 10 items in each folder"</p>

<p>Would you create all the files in a directory  and then create each folder  move files to folder till no file left ?</p>

<pre><code>private static void MoveToFolders(string targetDirectory,int numberOfFolders, int numberOfFilesGenerated)
{
    int itemsPerFolder = numberOfFilesGenerated / numberOfFolders;
    ?????
    //
}
</code></pre>

<p>Suggestions?</p>
