laptop_01 Posted September 29, 2003 Posted September 29, 2003 Hi; I got a string like this X:\program file\myfolder1\myFolder2\myfile.dat I need to extract myfile.dat out of this using C#. In VB, there is a nice instrRev method that allowed me to march backward from end of string. Is there something similar in C# Thansk Quote
*Experts* mutant Posted September 29, 2003 *Experts* Posted September 29, 2003 To extract a file name from any path use the Path class of the IO class: string filename = System.IO.Path.GetFileName("path"); Quote
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.