you will probably have a FileStream object somewhere. get the full name using FileStream.name, then copy from the last occurence of "/", to the last occurence of ".".
FileStream myFile = new FileStream("C:/file.txt", FileMode.Open);
string fullName = myFile.name;
int nameFrom = fullName.LastIndexOf("/"

;
int nameTo = fullName.LastIndexOf("."

;
string filename = fullName.Substring(nameFrom, nameTo-nameFrom);
- i think this should work. my apologies if you end up being a character out.
____________________________________________________
If you like a post, show you care by giving it a star.