Convert from URL to File Path String?

Jim Ault JimAultWins at
Wed Oct 31 20:03:16 EDT 2007

On 10/31/07 4:38 PM, "Dave" <dave at> wrote:

> I have a URL of the form:
> file://localhost/Users/Dave/Folder/Folder/
> and I want to convert it to:
> /Users/Dave/Folder/Folder/
> Is there a function to do this, or do I just have to remove "file;//
> localhost" from the front of the string?

I would use one line to do this:
put " file://localhost/Users/Dave/Folder/Folder/" into urlLocal

put char offset("/Users/", urlLocal) to -1 of urlLocal into urlUsers

Jim Ault
Las Vegas

More information about the Use-livecode mailing list