chlowden Posted April 10, 2009 Posted April 10, 2009 (edited) I am trying to find a way to parse out a part of a field that contains a ref files location on an HD and export the result. Example: I have 10 container fields per entry that have QT refs. I have a field for each container field that, by a calc, shows me the location of the container field file. e.g. moviemac:/OLD/WORK/lowden/film.mov I am looking for way to parse out the last folder & file info ... /lowden/film.mov for each container in each entry & copy the info into 10 new fields that I will call Parsed_address & through 10. I presume that on the proviso that the parsing works, I can then export the resulting "/folder/file" address as a tabs list? Can anyone help please? Edited April 10, 2009 by Guest
mr_vodka Posted April 10, 2009 Posted April 10, 2009 Here is a hint. Look into PatternCount () to count the number of slashes, then go 2 directories back. Combine this with Middle () or Right (). As for ten different fields, seems to me that you have a structural issue. You really should have these in a related table.
comment Posted April 10, 2009 Posted April 10, 2009 I believe there is a simpler way: Let ( len = Length ( text ) ; Right ( text ; len - Position ( text ; "/" ; len ; -2 ) ) ) copy the info into 10 new fields that I will call Parsed_address & through 10 What John said: not a good idea.
chlowden Posted April 10, 2009 Author Posted April 10, 2009 (edited) I believe there is a simpler way: Let ( len = Length ( text ) ; Right ( text ; len - Position ( text ; "/" ; len ; -2 ) ) ) What John said: not a good idea. Thank you for the replies. Mr Vodka, I have had a look at PatternCount but I am have not got very far for the moment. Thank you very much. It works great. It is much simpler than anything else. Edited April 10, 2009 by Guest
LaRetta Posted April 10, 2009 Posted April 10, 2009 I presume that I have to tell the calc where to look, but is that where in the calc ? Replace the words text with your field. :wink2:
chlowden Posted April 10, 2009 Author Posted April 10, 2009 Sorry. I worked it out like an adult. All works great.
Recommended Posts
This topic is 5705 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