- Scilab help
- Files : Input/Output functions
- basename
- chdir
- copyfile
- createdir
- deletefile
- dir
- dirname
- dispfiles
- fileext
- fileinfo
- fileparts
- filesep
- findfiles
- fprintf
- fprintfMat
- fscanf
- fscanfMat
- fullfile
- fullpath
- get_absolute_file_path
- getdrives
- getlongpathname
- getrelativefilename
- getshortpathname
- %io
- isdir
- isfile
- listfiles
- listvarinfile
- ls
- maxfiles
- mclearerr
- mclose
- mdelete
- meof
- merror
- mfprintf
- mscanf
- mget
- mgetl
- mgetstr
- mkdir
- mopen
- movefile
- mput
- mputl
- mputstr
- mseek
- mtell
- newest
- pathconvert
- pathsep
- pwd
- removedir
- rmdir
- save_format
- scanf
- scanf_conversion
- sscanf
Please note that the recommended version of Scilab is 2024.1.0. This page might be outdated.
See the recommended documentation of this function
fileparts
returns the path, filename and extension for a file path
Calling Sequence
[path,fname,extension]=fileparts(fullpath) value=fileparts(fullpath,sel)
Arguments
- fullpath
a character string, the given file path
- sel
a optional character string selector, with posible values: 'path' 'fname' or 'extension'
- path
a character string, the path of the directory pointed to by fullpath
- fname
a character string, the filename part is any or ''
- extension
a character string, the extension part is any or ''
- value
a character string, depending on sel value
Description
[path,fname,extension]=fileparts(fullpath)
splits the
fullpath character string in its three parts: the path of the
directory pointed to, the filename part, the extension part
including the dot.
Examples
[path,fname,extension]=fileparts('SCI/etc/scilab.start') fileparts('SCI/etc/scilab.start','extension')
See Also
- pathconvert — pathnames convertion between POSIX and windows.
- basename — strip directory and suffix from filenames
- fullfile — Build a full filename from parts
Authors
Serge Steer, INRIA
<< fileinfo | Files : Input/Output functions | filesep >> |