• 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: Access to a file via relative path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Access to a file via relative path


  • Subject: Re: Access to a file via relative path
  • From: Mr Tea <email@hidden>
  • Date: Tue, 15 Oct 2002 16:38:34 +0100

This from Markus Wick - dated 15-10-02 02.50 pm:

> Is thete a way of relative file path access, so i can tell the script
> somehow to determine its posistion itself, move up one folder, go into
> folder "filemakerdata" and have access to the "file_to_open"-file ?

If the script has been saved as an application, 'path to me' will give the
location of the script applet, so you could use something like this:

set thePath to path to me
tell application "Finder"
set theFolder to (container of thePath)
set theParentFolder to (container of theFolder)
set fileMakerData to (theParentFolder as string) & "Folder Name" & ":"
set file_to_open to fileMakerData & "File Name" as alias
end tell


This doesn't work with compiled scripts.


HTH

Mr Tea
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Access to a file via relative path (From: Markus Wick <email@hidden>)

  • Prev by Date: Access to a file via relative path -- was Re: (no subject)
  • Next by Date: Re: Access to a file via relative path -- was Re: (no subject)
  • Previous by thread: Access to a file via relative path
  • Next by thread: QuickTime Player Scripting
  • Index(es):
    • Date
    • Thread