GetFileNameWithoutExtension' is not a member of 'String

@rahul.kharapkar yes that’s why the error occurred, change the variable name to paths or strPath as instead of taking the reserved keyword path (which contains getfilenamewithoutextension method) it takes Variable path(which don’t have that method).

There are lots of post similar to this one(all the solutions are also same ) please refer,

Thanks