title: Split filenames with python
body: <p>I have files that I want only 'foo' and 'bar' left from split. </p>
  
  <pre><code>dn = "C:\\X\\Data\\"
  </code></pre>
  
  <p>files </p>
  
  <pre><code>f=  C:\\X\\Data\\foo.txt
  f=  C:\\X\\Dats\\bar.txt
  </code></pre>
  
  <p>I have tried <code>f.split(".",1)[0]</code></p>
  
  <p>I thought since dn and .txt are pre-defined I could subtract, nope. 
  Split does not work for me. </p>