batch: select top file from directory
<p>I have a folder full of config files called config#.json, where the # is a 2 digit base 15 number. I need some way to select one of the files, and put its name in a variable<br>
I have been thinking about this for a while, but I'm not a very advanced batch programmer. There may be a way by using the results from a dir command, for example, if I get the last entry from the 8th line or something. I can get rid of the space in the name which may make it easier:</p>

<pre><code> Volume in drive C is Local Disk
 Volume Serial Number is 1A97-93E9

 Directory of C:\Users\hazzj\Google Drive\Home\Stuff\Apache-Server\htdocs\launcher_profiles

12/10/2016  05:44 PM    &lt;DIR&gt;          .
12/10/2016  05:44 PM    &lt;DIR&gt;          ..
12/10/2016  05:44 PM               707 config 11.json &lt;- this bit here
12/10/2016  05:44 PM               707 config 12.json
12/10/2016  05:44 PM               707 config 13.json
12/10/2016  05:44 PM               707 config 14.json
12/10/2016  05:44 PM               707 config 15.json
12/10/2016  05:44 PM               707 config 16.json
12/10/2016  05:44 PM               707 config 17.json
12/10/2016  05:44 PM               707 config 18.json
12/10/2016  05:44 PM               707 config 19.json
         204 File(s)        144,228 bytes
           2 Dir(s)  344,802,287,616 bytes free
</code></pre>

<p>any help would me greatly appreciated.</p>