# Uigetdir operates differently in octave vs MATLAB

The octave version of uigetdir works differently to the MATLAB version.

In MATLAB, running uigetdir opens a dialog box, then navigating to the folder one wishes to select, clicking on that folder (not opening, just selecting), and then clicking the button labelled ‘select folder’ returns the path to the selected folder. In octave, clicking on the name of the folder has no effect, generally meaning that the level above the desired one is selected. Also, a trailing slash is included in octave.

For clarity:
M: C:\path\to\desired\folder
O: C:\path\to\desired\

Currently, this breaks compatibiliity for a project.

# My system

• OS: Windows 10 (version 2004)
• Octave version: Version 5.2.0
• MATLAB version: 9.6.0.1174912 (R2019a) Update 5

First time posting. Is this the right place for this type of note?

Welcome. What do you mean by this?

There is a bug report with a workaround in it. This behavior should be fixed for Octave 6.

1 Like

Hi, I’m using last stable version 6.3.0 on windows 10 64bits in Spanish: I found that in my OS the behavior of uigetdir is like the “octave” style reported at the beginning of this thread, but in a different machine with the very same Octave version and OS, only in English instead of Spanish, the behaviour turns “matlab” style. hope this can help to solve the bug.

From the bug report linked above:

Yes, de-selecting “Use native file dialogs” fixes the issue for me too.

Does that setting make a difference for you?

yes, I confirm