title: Get Filename from Filepath
body: <p>I want to get the filename from a filepath.
  My problem is, that I found many solutions for handling it with input via parameters.
  But I want to use a userinput instead of a parameter.</p>
  
  <p>The soultion for parameters is:</p>
  
  <pre><code>%~nxI       //I could be number for the parameter count
  </code></pre>
  
  <p>My script actually looks like this:</p>
  
  <pre><code>   @echo off
     set /p path=Film: 
     echo %path2%
     pause
  </code></pre>
  
  <p>Now I want to get the filename + extension from <code>%path%</code> and write it to <code>%path2%</code>.</p>
  
  <p>Could anyone help me please?</p>