Newbies mirkovonberner Posted June 7, 2008 Newbies 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
Hare Posted June 7, 2008 Posted June 7, 2008 will that word be always the last folder in the path (before the filename)?
Newbies mirkovonberner Posted June 7, 2008 Author Newbies 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
Hare Posted June 7, 2008 Posted June 7, 2008 Try this: Let ([ list = Substitute ( path ; "/" ; ¶ ) ; values = ValueCount ( list ) ]; GetValue ( list ; values - 1 ) )
Newbies mirkovonberner Posted June 7, 2008 Author Newbies Posted June 7, 2008 Hi Hare, It worked! Thanks, I appreciate your prompt response. Cheers
Recommended Posts
This topic is 6017 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