Strip out file name without extension - c#

How can I strip get just the file name from a file, without the extesnion? I'd like to strip out the name of the file, for example, MyFile.ppt, all I want is MyFile? Is there a way to do this in c#? I think this is simple, but for some reason I'm drawing a blank.
dodgerfanAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
aprestoConnect With a Mentor Commented:
correction:

System.IO.Path.GetFileNameWithoutExtension("myFile.ppt");

Open in new window

0
 
aprestoCommented:
System.IO.Path.GetFileWithoutExtension("myFile.ppt")
 
0
 
dodgerfanAuthor Commented:
Perfect, thank you very much!
0
 
aprestoCommented:
You're welcome, glad to help
Apresto
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.