Running octave .m file from windows batch

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Running octave .m file from windows batch

Lester Anderson
Hello,

Is there a trick to getting Octave to run a .m file from within a
windows .bat file at the command line?

Tried variations of this, but not working (cli, --no-gui etc)
C:\Octave\octave-4.2.1\bin\octave.exe --eval test_install_421.m

Gives an error on "liboctinterp-4.dll mssing" yet this is in the \bin directory

Thanks for any pointers
Lester

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Running octave .m file from windows batch

NJank
On Thu, Sep 7, 2017 at 11:05 AM, Lester Anderson <[hidden email]> wrote:
Hello,

Is there a trick to getting Octave to run a .m file from within a
windows .bat file at the command line?

Tried variations of this, but not working (cli, --no-gui etc)
C:\Octave\octave-4.2.1\bin\octave.exe --eval test_install_421.m

Gives an error on "liboctinterp-4.dll mssing" yet this is in the \bin directory


call the batch file not the executable.  it will pass command line arguments to the executable and make sure all proper path and environment variables are set.

i.e., i created a testfile.m that just contains 1, 2, 3, 4 ,5 on separate lines from the command line in the octave-4.2.1 directory:

octave --persist testfile.m

opens the octave gui and executes the file. the --persist option keeps octave open afterwards, otherwise it would only open the --no-gui, run the script, and close. 



_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Running octave .m file from windows batch

Lester Anderson
That solved the issue - thanks

On 7 September 2017 at 16:42, Nicholas Jankowski <[hidden email]> wrote:

> On Thu, Sep 7, 2017 at 11:05 AM, Lester Anderson <[hidden email]>
> wrote:
>>
>> Hello,
>>
>> Is there a trick to getting Octave to run a .m file from within a
>> windows .bat file at the command line?
>>
>> Tried variations of this, but not working (cli, --no-gui etc)
>> C:\Octave\octave-4.2.1\bin\octave.exe --eval test_install_421.m
>>
>> Gives an error on "liboctinterp-4.dll mssing" yet this is in the \bin
>> directory
>
>
>
> call the batch file not the executable.  it will pass command line arguments
> to the executable and make sure all proper path and environment variables
> are set.
>
> i.e., i created a testfile.m that just contains 1, 2, 3, 4 ,5 on separate
> lines from the command line in the octave-4.2.1 directory:
>
> octave --persist testfile.m
>
> opens the octave gui and executes the file. the --persist option keeps
> octave open afterwards, otherwise it would only open the --no-gui, run the
> script, and close.
>
> for all of the command line options see:
>
> https://www.gnu.org/software/octave/doc/interpreter/Command-Line-Options.html
>

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave