Page 1 of 1

Gathering the last part of a text string

Posted: Mon Apr 13, 2015 1:17 am
by quailcreek
Hello everybody,
I need to gather the name of an image file from the images fileName in the stack. The short name of the file in the stack is not necessarily the same. So I can't use "get the short name of..." How do I extract the “the file name.gif” part of this path string?

/thisFolder/thatFolder/images/the file name.gif

Thanks for the help!

Re: Gathering the last part of a text string

Posted: Mon Apr 13, 2015 1:56 am
by sefrojones
This might work:

Code: Select all

   put "/thisFolder/thatFolder/images/the file name.gif" into tPath
   set the itemdelimiter to slash
   put the last item of tPath
--Sefro

Re: Gathering the last part of a text string

Posted: Mon Apr 13, 2015 5:04 am
by quailcreek
Thanks, Sefro. That was perfect. itemdel was what I was missing.