[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: here?
From: |
David Bateman |
Subject: |
Re: here? |
Date: |
Sun, 18 Feb 2007 15:06:16 +0100 |
User-agent: |
Thunderbird 1.5.0.7 (X11/20060921) |
David Bateman wrote:
> Vic Norton wrote:
>
>> Can anyone tell me how to change the working directory to where you are?
>>
>> For example it would be nice to have a "here" function that would return the
>> path of the directory in which a script resides. Then
>> thisdir = here();
>> cd thisdir;
>> would do just what I want.
>>
>> I do this kind of thing all the time in Perl with the two lines
>> use FindBin qw($Bin);
>> chdir $Bin;
>> I'd like to be able to do it in Octave.
>>
>> Thanks for any suggestions you might have. - Vic
>>
>
>
> fileparts(mfilename("fulpath"))
>
> D.
>
>
>
That should have been
fileparts(mfilename("fullpath"))
I mis-spelt "fullpath" as "fulpath".
D.
- here?, Vic Norton, 2007/02/18