• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: relative paths etc...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: relative paths etc...


  • Subject: Re: relative paths etc...
  • From: Jean-Christophe Helary <email@hidden>
  • Date: Wed, 27 Dec 2017 22:26:00 +0900


> On Dec 27, 2017, at 20:56, Shane Stanley <email@hidden> wrote:
>
> On 27 Dec 2017, at 8:59 pm, Jean-Christophe Helary
> <email@hidden> wrote:
>>
>> I just want to know if there is a way to accomplish that that does not
>> involve weird (path as string) manipulations...
>
> I guess it depends on your definition of weird.
>
> set fullPath to "/path/to/folder/path/from/folder/file"
> set rootPath to "/path/to/folder"
> set relpath to "." & text ((length of rootPath) + 1) thru -1 of fullPath

That pretty much fits my definition :)

But thank you. I'll see which of your approach and Yves is easier to fit in my
code and will probably come back here for further hints.

In the meanwhile, I hope you all have nice holidays.

Jean-Christophe Helary
-----------------------------------------------
@brandelune http://mac4translators.blogspot.com


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >relative paths etc... (From: Jean-Christophe Helary <email@hidden>)
 >Re: relative paths etc... (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: relative paths etc...
  • Next by Date: Using AS to put a password on zipped files (was Re: relative paths etc...)
  • Previous by thread: Re: relative paths etc...
  • Next by thread: Using AS to put a password on zipped files (was Re: relative paths etc...)
  • Index(es):
    • Date
    • Thread