title: Extract the filename from a path
body: <p>I want to extract filename from below path:</p>
  
  <pre>D:\Server\User\CUST\MEA\Data\In\Files\CORRECTED\CUST_MEAFile.csv</pre>
  
  <p>Now I wrote this code to get filename. This working fine as long as the folder level didn't change. But in case the folder level has been changed, this code need to rewrite. I looking a way to make it more flexible such as the code can always extract filename regardless of the folder level.</p>
  
  <pre><code>($outputFile).split('\')[9].substring(0)
  </code></pre>