Guest lepernet Posted October 19, 2002 Posted October 19, 2002 I was sure that I saw a function for extracting the extension from a filename. Alas having pulled all my hair out trying to find it in the documentation I now throw myself on your mercy. Ok ... what is it ? :( Quote
*Gurus* divil Posted October 19, 2002 *Gurus* Posted October 19, 2002 Look up the various functions of the System.IO.Path class Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Guest UncleSam Posted October 19, 2002 Posted October 19, 2002 position = InStrRev(Text1.Text, ".") Text2.Text = Right(Text1.Text, Len(Text1.Text) - position + 1) I'm nearly sure it works like this. It even works if you have 10000 + . in the filename Quote
*Gurus* divil Posted October 19, 2002 *Gurus* Posted October 19, 2002 My way is better. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
*Experts* Bucky Posted October 19, 2002 *Experts* Posted October 19, 2002 Divil is right. If you want to use the cool new .NET framework methods and classes, go for using the IO.Path class. It's also much easier than the above. The method to use is IO.Path.GetExtension() Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.