extraction of file from filepath
<p>I need to extract file name without extension name.</p>

<p>example.</p>

<p>/home/si/text.txt</p>

<p>/home/si/text.vx.txt </p>

<p>In the both case I should receive output text only. I am not sure how many trailing extension file can have but I need to extract only file name. I have tried spliitext(filename)[0] but it gave me output text.vx rather than text</p>
