Opening Octave through command prompt

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

Opening Octave through command prompt

Adrg01
This post was updated on .
Hello
I am a windows user of Octave.

I would like to know how to open octave
through command prompt. In general you can do this by adding your target folder in PATH and then simply writing the program name in the command line (for eg, articles online suggest simply typing octave in terminal is enough in Linux based systems), but it seems octave does not run through a single program but help of various scripts.

--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: Opening Octave through command prompt

Ian McCallion
On Saturday, 25 April 2020, Adrg01 <[hidden email]> wrote:
Hello
I am a windows user of Octave. I would like to know how to open octave through cmd window as that makes it easier to have open octave cli in whatever directory I want to without changing it through the octave shell.
Articles available online mostly have solutions for Linux shell.

I also can't find a particular file for it (as the shortcut to Octave-cli calls for two files wscript and octave.vbs), so adding a folder to the PATH does not seem to be one of the solutions.

Assuming you want to launch your Octaves from icons on the desktop or elsewhere you can do the following:

1. Make copies of the desktop icon and put them where you want in the folder structure.

2. Rename the copies to something meaningful to you.

3. Edit the shortcut properties (right click on shortcut -> properties) and set the "start in" line to the appropriate folder location.

Clicking the shortcut will now do as you desire.

Regarding the files you can't find, wscript is part of Windows (it's one of the scripting engines), and octave.vbs is in the root of the octave install folder. 

Cheers Ian
 


Reply | Threaded
Open this post in threaded view
|

Re: Opening Octave through command prompt

mmuetzel
In reply to this post by Adrg01
Am 25. April 2020 um 11:40 Uhr schrieb "Adrg01":
> I am a windows user of Octave. I would like to know how to open octave
> through cmd window as that makes it easier to have open octave cli in
> whatever directory I want to without changing it through the octave shell.
> Articles available online mostly have solutions for Linux shell.
>
> I also can't find a particular file for it (as the shortcut to Octave-cli
> calls for two files wscript and octave.vbs), so adding a folder to the PATH
> does not seem to be one of the solutions.

You could probably call "octave.bat" for your use case. For Octave 5.2.0 64bit installed at the default location, that file is in
C:\Octave\Octave-5.2.0\mingw64\bin

You might want to add that folder to the %PATH% environment variable.

HTH,
Markus