Creating numbered directories & grouping them by range
<p>What would be the normal way to do the following? I have some files in a directory (for example):</p>

<pre><code>01, 02, 03
10, 15
35
41, 44, 49
</code></pre>

<p>and I'd like to create and put them in directories like this:</p>

<pre><code>01-10
11-20
31-40
41-50
</code></pre>

<p>I'm not at all sure whether to have a list of ranges, or a list of start/end numbers, or a dictionary. Thanks for any help.</p>

<p>edit: I'm causing some confusion for which I apologize. </p>

<p>I have the following files:</p>

<pre><code>01.txt
02.txt
03.txt
10.txt
15.txt
35.txt
41.txt
44.txt
49.txt
</code></pre>

<p>I have the following directories in the same directory as the above files:</p>

<pre><code>01-10
11-20
31-40
41-50
</code></pre>

<p>I would like to move the .txt files into the directory they belong in. </p>
