Overload resolution error

I am getting this below error . I am not able to resolve this.

same error if I pass system.io.path.getfile(variable)

Hi @kishore_praveen

Change the Syntex as below

System.IO.Path.GetFilenamewithoutextension("Folder Path here")

It has to be store in a array of string datatype variable.
In the place of folder path give the folder path of yours.

If you want to get the specific extension files try the below one, for example I am taking excel files.

System.IO.Path.GetFilenamewithoutextension("Folder Path here","*.xlsx")

The above expression will store all the excel file names in a array of string datatype variable.

Hope it helps!!


Can you check type of the file variable?

If it’s object, GenericValue etc, the following works.


If it’s String array and you want to convert all items, the following will work.

stringArray = file.Select(Function(f) Path.GetFileName(f)).ToArray()


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.