bigzilla Posted March 31, 2005 Share Posted March 31, 2005 I there a way to parse (break out) the name of the image from the rest of the information? In the following example I would like to be able to have a field that would break out and show the “Mtn_Image.jpg†portion of the information and it would have to work on both Mac’s and Pc’s. Is that possible? Hard Drive:Users:Bill:Desktop:3-31-05 eailer:HTML Folder:Mtn_Image.jpg Thanks for your help, Bill Link to comment Share on other sites More sharing options...
Robert Schaub Posted March 31, 2005 Share Posted March 31, 2005 Here's a script from one of JMO's FP3 Files See Attached Link to comment Share on other sites More sharing options...
Maarten Witberg Posted March 31, 2005 Share Posted March 31, 2005 This could be simple if your filenames are always of the form AAA_BBB.ext then rightwords(pathname;3) will do. But otherwise you'll have to take the string to the right of the last separator. And the catch is, path separators in windows are "/" aren't they? whereas in mac it's ":". so you'd have to check for the platform... Now Get(systemplatform) generates "-1" on my mac. I cannot test what the result is on windows, so here's a stab... Code: Let ( Separator = Case(Get ( SysteemPlatform) ="-1";":";"/");Right ( PathName ; Length(PathName)- Position ( PathName ; Separator; 1 ; PatternCount ( PathName ; Separator) ))) kjoe PS I just learned from the help viewer that Get(systemplatform) will generate -2 on Win2000 or XP. So the test is probably OK. What I'm not clear on is what happens when you're on a mac linked to a win server, or the other way round. Get(systemplatform) will always give the result of the client machine, but what if the pathname is on the host? Link to comment Share on other sites More sharing options...
bigzilla Posted April 1, 2005 Author Share Posted April 1, 2005 Hi guys, Kjoe your parsing works great on a Mac, I'll try it on a Pc later. Thanks for your help, Bill Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.