Hey,
i have a file abc.txt.
I want to fetch only the file name i.e. abc and not the extension
Thanks in advance!
Hey,
i have a file abc.txt.
I want to fetch only the file name i.e. abc and not the extension
Thanks in advance!
If MyPath
is the path to the file, use System.IO.Path.GetFileNameWithoutExtension(MyPath)
.
Yes, Iād forgotten the Path part.
This will have the extension
i use
Eg: item=abc.txt
Path.GetFileName(item)
You missed the full name GetFileNameWithoutExtension
got it.
Thanks
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.