Can I get the filebrowser-command to return value to the variable?

>> abc="file.txt"
abc = file.txt
>> abc=filebrowser()
error: value on right hand side of assignment is undefined

If in this case the browser also could return the selected file to the octave variable.

The filebrowser function returns immediately, before any file has been selected. It is meant to open the builtin GUI file browser. If you need a file selection dialog then uigetfile is probably what you are looking for.

1 Like

ok. the “uigetfile” is the one.
I was just looking keyword “browser”:
>> lookfor browser
that looks the one.
But something strange…

  cd fp;
error: fp: No such file or directory

I try also

>> cd cellstr(fp)
error: cellstr(fp): No such file or directory
>> fp
fp = /home/jari/bin/
>> cd /home/jari/bin

not sure… looks working only manually, maybe need enter like function.
this looks finally correct.
looks like solved.

[fn,fp,fi]=uigetfile([],“give file”);

this looks nice…