from pathlib import Path


def _extract_filename_from_filepath(strFilePath=""):
    """
    Function which extracts file name from the given filepath
    """
    if strFilePath:
        try:
            strFileName = Path(strFilePath).name
            strFileName = str(strFileName).split(".")[0]
            # strFileName = strFilePath[strFilePath.rindex("\\") + 1 : ]
            # strFileName = strFileName.split(".")[0]
            return strFileName
        except Exception as ex:
            print("Error in _extract_filename_from_filepath="+str(ex))


    else:
        print("Please enter the value="+str(strFilePath))