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!
Gathering the last part of a text string
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
Gathering the last part of a text string
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- Livecode Opensource Backer
- Posts: 447
- Joined: Mon Jan 23, 2012 12:46 pm
Re: Gathering the last part of a text string
This might work:
--Sefro
Code: Select all
put "/thisFolder/thatFolder/images/the file name.gif" into tPath
set the itemdelimiter to slash
put the last item of tPath
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
Re: Gathering the last part of a text string
Thanks, Sefro. That was perfect. itemdel was what I was missing.
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14