Hi, im trying to split this string but so far i cant get want i want this is the string : E:\Documents and Settings\Prox-YD\Escritorio\Music.mp3
what i want to get is this
from the string : Music
but i dont know how to
thanks:)
Printable View
Hi, im trying to split this string but so far i cant get want i want this is the string : E:\Documents and Settings\Prox-YD\Escritorio\Music.mp3
what i want to get is this
from the string : Music
but i dont know how to
thanks:)
Split it into an array delimited by '\' then take the last element of the array. Once you have this do the substring from 0 to the location of '.'
csharp Code:
string fileName = System.IO.Path.GetFileNameWithoutExtension(@"E:\Documents and Settings\Prox-YD\Escritorio\Music.mp3"); MessageBox.Show(fileName);
thanks