tags:

views:

46

answers:

1

hi

is there any way that i give path and i receive the file name ?

for example:

i give: c:\MyPic\OldPic\me.jpg

and i get: me.jpg

thank's in advance

+7  A: 

You may take a look at the Path.GetFileName method:

string filename = Path.GetFileName(@"c:\MyPic\OldPic\me.jpg");
Darin Dimitrov