Newbies mirkovonberner Posted June 7, 2008 Newbies Share Posted June 7, 2008 (edited) Hi, I have a field with a file path and I want to extract just a word from it, how I do it? Example: file: //Mac/Users/Me/Documents/Images/ProjectA/sculptures/A1.jpg returns: sculptures file: //Mac/Users/Me/Documents/Images/ProjectB/photographs/File5abc.jpg returns: photographs Edited June 7, 2008 by Guest more explicit Link to comment Share on other sites More sharing options...
Hare Posted June 7, 2008 Share Posted June 7, 2008 will that word be always the last folder in the path (before the filename)? Link to comment Share on other sites More sharing options...
Newbies mirkovonberner Posted June 7, 2008 Author Newbies Share Posted June 7, 2008 will that word be always the last folder in the path (before the filename)? Well, yes, that last folder name is what I need now. The last part, the file name, is different every time and have different number of characters. BTW, once I get to know how to get that last folder name of the path maybe I would try to get the previous folder name as well : TIA Link to comment Share on other sites More sharing options...
Hare Posted June 7, 2008 Share Posted June 7, 2008 Try this: Let ([ list = Substitute ( path ; "/" ; ¶ ) ; values = ValueCount ( list ) ]; GetValue ( list ; values - 1 ) ) Link to comment Share on other sites More sharing options...
Newbies mirkovonberner Posted June 7, 2008 Author Newbies Share Posted June 7, 2008 Hi Hare, It worked! Thanks, I appreciate your prompt response. Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5801 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now