[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Changing Directories



At 11:15 1997-6-16 -0700, Mark Hunt wrote:
>I am having difficulty changing directories in my scripts.  It seems to be OK
>if I change into a folder further/forward in the directory structure, but I am
>not able to move backwards.  I'm trying to access a file in a folder that is
>at the same directory level as the directory I am in.  This is the line from
>my script:
>
>chdir ("/textfiles");

The path separator on the Mac is ":", not "/".  Two periods ("::") will
move you one directory up in the hierarchy.  So on a Mac you should write

        chdir("::textfiles");

The equivalent on a UNIX system would be

        chdir("../textfiles");

Gero Herrmann
University of Electro-Communications
Tokyo, Japan


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch