Error in path, although it "exists"

4 visualizaciones (últimos 30 días)
Claes Olsson
Claes Olsson el 24 de En. de 2019
Respondida: Yash el 3 de En. de 2025
Dear Mathworks,
I am running some code that worked fine under r2017a, but now I am on the prerelease 2019a. I want to load a file from a starting directory, that tests OK with "exist", but when I use uigetfile, I get an error message. Any idea? /Claes Olsson
K>> [fNames, fPath, filterNdx] = uigetfile(...
{'*.raw', 'Bruker *.raw v.3'; ...
'*.brml', 'Bruker *.brml'; ...
'*.*', 'All Files'}, ...
'Open *.raw File', ...
'G:\Department\SF\Measurement\SESPC16337\2019\1jan\', 'MultiSelect', 'on');
Error using matlab.ui.internal.dialog.FileSystemChooser/PathParser (line 87)
Invalid directory to operate on
Error in matlab.ui.internal.dialog.FileSystemChooser/set.InitialPathName (line 32)
iPath = PathParser(obj,iPath);
Error in uigetputfile_helper (line 52)
ufd.InitialPathName = dialog_pathname;
Error in uigetfile (line 130)
[filename, pathname, filterindex] = uigetputfile_helper(0, varargin{:});
K>> exist('G:\Department\SF\Measurement\SESPC16337\2019\1jan\')
ans =
7
K>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.6.0.1011450 (R2019a) Prerelease
MATLAB License Number: Prerelease
Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 17134)
Java Version: Java 1.8.0_181-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.6 (R2019a)
Image Processing Toolbox Version 11.0 (R2019a)
MATLAB Compiler Version 7.0.1 (R2019a)
Optimization Toolbox Version 8.3 (R2019a)
  4 comentarios
Jan
Jan el 18 de Dic. de 2022
But why was the question raised now?
Steven Lord
Steven Lord el 18 de Dic. de 2022
My guess is that someone posted a spam answer or comment (which made this question one of the "Most recently updated" items) and then that spam was deleted.

Iniciar sesión para comentar.

Respuestas (1)

Yash
Yash el 3 de En. de 2025
Hi Claes,
This works perfectly fine in the final release of MATLAB R2019a. However, I found one mistake in the code shared, the extensions to filter the files should be separated by semi-colon instead of a comma. Given below is the updated code:
[fNames, fPath, filterNdx] = uigetfile(...
{'*.raw'; 'Bruker *.raw v.3'; ...
'*.brml'; 'Bruker *.brml'; ...
'*.*'; 'All Files'}, ...
'Open *.raw File', ...
'G:\Department\SF\Measurement\SESPC16337\2019\1jan\', 'MultiSelect', 'on');
If the issue persists for you, please contact MathWorks Technical Support at: https://www.mathworks.com/support/contact_us.html

Categorías

Más información sobre MATLAB Compiler en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by