- Scilab Help
- GUI
- Borders
- Layouts
- Menus
- uitree
- about
- clipboard
- close
- Console properties
- createWindow
- exportUI
- figure
- findobj
- gcbo
- getcallbackobject
- getinstalledlookandfeels
- getlookandfeel
- getvalue
- Interactive Editor
- loadGui
- messagebox
- printfigure
- printsetupbox
- progressionbar
- root_properties
- saveGui
- setlookandfeel
- toolbar
- toprint
- tree_show
- uicontrol
- uicontrol properties
- uigetdir
- uigetfile
- uigetfont
- uiputfile
- usecanvas
- waitbar
- x_choices
- x_choose
- x_choose_modeless
- x_dialog
- x_matrix
- x_mdialog
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
uigetfile
dialog window to get a file(s) name(s), path and filter index
Syntax
PathFileName = uigetfile() PathFileName = uigetfile(file_mask) PathFileName = uigetfile(file_mask, dir) PathFileName = uigetfile(file_mask, dir, boxTitle) PathFileName = uigetfile(file_mask, dir, boxTitle, multipleSelection) [PathFileName, Path] = uigetfile(..) [PathFileName, Path, FilterIndex] = uigetfile(..)
Arguments
Input parameters
- file_mask
a string matrix which gives the file masks to use for file selection.
file_mask
is written with Unix conventions. The default value is"*"
.A description of each mask may be provided in column#2, for example
["*.xcos|*.zcos", "Xcos files"; "*.bin","BIN files"]
.- dir
a character string which gives the initial directory used for file search. By default uigetfile uses the previously selected directory.
- boxTitle
a character string which gives the title of the uigetfile window. By default uigetfile's title is 'uigetfile'.
- multipleSelection
a boolean which allows to load only one file if it is at '%f' (false) or multiple files if it is at '%t" (true). By default uigetfile's multiple file selection is not enable.
Output parameters
- PathFileName
matrix of strings which give the user selected file(s) (path + file(s) name(s)) if user answers
"OK"
or" "
if the user answers"Cancel"
.- Path
is the user selected file(s) path if the user answers
"Ok"
or" "
if the user answers"Cancel"
.- FilterIndex
Selected filter index on the list box if the user answers
"OK"
, or"0"
if the user answers"Cancel"
.
Description
Creates a dialog window for file(s) selection.
Comments
On Windows, java component used by uigetfile browse also .zip archive then it is very slow with big .zip files.
To disable, this feature:
if getos() == 'Windows' then unix("REGSVR32 /u %WINDIR%\System32\zipfldr.dll") ;end
To re-enable,
if getos() == 'Windows' then unix("REGSVR32 %WINDIR%\System32\zipfldr.dll") ;end
Examples
uigetfile(["*.bin"; "*.sce"; "*.cos*"]) uigetfile(["*.tst|*.dia.ref","Tests files"]) uigetfile(["*.sci"; "*.bin"], "SCI/modules/gui/macros/") uigetfile(["*.sc*"; "*.bin"], "SCI/modules/gui/macros/") uigetfile(["*.xcos|*.zcos","Xcos files"; "*.bin","BIN files"], "SCI/modules/gui/macros/") uigetfile(["*.sce"; "*.bin"], "SCI/modules/gui/macros/", "Choose a file name", %t); uigetfile(["*.sce"; "*.bin"], "SCI/modules/gui/macros/", "Choose a file name", %f);
See also
Report an issue | ||
<< uigetdir | GUI | uigetfont >> |