How do I remove part of a path?

Jim Ault jimaultwins at
Mon Aug 1 10:49:10 EDT 2011

Chri, which version of LC are you using?

My version 4.5 does not delete the itemDel, just the contents.

put empty into item 4 of tString --keeps the "/"
delete item 4 of tString  -- purges the slash

-- this should work to make a shorter path string
replace "/" with itemDel in tString
delete item itemOffset("public.html", tString) of tString
--purges the item
replace itemDel with "/" in tString

Jim Ault
Las Vegas

--- On Mon, 8/1/11, Nonsanity <form at> wrote:

From: Nonsanity <form at>
Subject: Re: How do I remove part of a path?
To: "How to use LiveCode" <use-livecode at>
Date: Monday, August 1, 2011, 7:25 AM

set itemdel to "/"
put "" into item 4 of it

There should be no double slash then. That line removes that whole item.

 ~ Chris Innanen
 ~ Nonsanity

On Sun, Jul 31, 2011 at 10:55 PM, Michael Kann <mikekann at> wrote:

> Pete,
> I checked to see if the itemDelimiter trick left behind a "/" and found
> that it does.
> -- notice the 2 forward slashes where there should be uno.
> Mike

More information about the Use-livecode mailing list