To Extract part of a string in a given line:
Given line is:
D:\AB554P_Itr23\ModelDir\AB554P_approximation_NodeData.dat Read 3/18/2010
I need to extract only the file name AB554P_approximation_NodeData.dat. I am using CodeGear RAD Studio C++ Builder. Thanks:)
The RTL function
ExtractFileName()will extract the file name from a path.Exactly how to split the 3 fields in your example depends very much on what the rules are for forming that line of text. How is it delimited? Is is delimited by spaces? If so, how do you escape spaces in the file path? Until you specify that information, that part of your question is unanswerable.