Why is the initial working directory of 'do script' root? Was: Interacting with external shell scripts
Why is the initial working directory of 'do script' root? Was: Interacting with external shell scripts
- Subject: Why is the initial working directory of 'do script' root? Was: Interacting with external shell scripts
- From: "Anthony Adachi" <email@hidden>
- Date: Mon, 11 May 2009 17:45:57 -0400
Hello Mark,
On Mon, 11 May 2009 15:31:09 -0400 Mark J. Reed wrote:
>No. Shell script functions are only callable from the shell, and only
>from the specific shell instance where defined.
>
>> File system changes such as these?...
>
>File system changes such as any. Shell commands can read files, write
>files, delete files, create directory trees, whatever. The point is
>that
>
>do shell script "cd /some/directory"
>
>followed by
>
>do shell script "pwd"
>
>does not yield "/some/directory".
That brings up another issue.
Who or what is determining the initial working directory of the 'do
shell script' command?
If an AppleScript Applet is run in some sub-directory within a user's
home directory the 'do shell script "pwd"' command on it's own results
in something different than if a shell script containing 'pwd' was run
from the same location....
do shell script "pwd"
--> "/"
Why is the current working directory root rather than the directory from
which the AppleScript script invoking "do script" is running?
Thanks,
-Anthony
_______________________________________________
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