title: How to generate a txt from CMD as dir/on/s however with the file name sorted from file extension
body: <p>I have created a file of a directory and it subdirectories with the command</p>
  <pre><code>dir/on/s&gt;filename.txt
  </code></pre>
  <p>However this file shows the file names with the extension all together - e.g. <code>file-name-001.xlsx</code> or <code>file-drawing.pdf</code>.</p>
  <p>It has been woeful to solve using Excel tools, so I was wondering if it is possible to create the file from cmd with the extension already in a separated column.</p>
  <p>The current file extracted from txt, only misses the extensions in the yellow fields (I got those filled in the picture manually, but it has &gt;35k lines)
  <img src="https://i.stack.imgur.com/Mz7YH.png" alt="Excel-file-current" /> - notice that using dots as a criteria would cause trouble with some file names with dots in it. Also, xlsx, ods, sldprt have different numbers of characteres.</p>
  <p>cmd where I extracted the txt and created the excel file above <img src="https://i.stack.imgur.com/m339U.png" alt="cmd-1" /></p>
  <p>I tried the command</p>
  <pre><code>dir/on/s/-n
  </code></pre>
  <p>It got the file extension separated from file name (2nd column), however the file name is shorted with just a few characters; I need it with the full name of each file. <img src="https://i.stack.imgur.com/pgMmn.png" alt="CMD-2" />.</p>
  <p>Could you, please, inform if there are a better command in CMD for that (creating a txt with the extension separated from file names)?</p>