Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Português - 日本語 - Русский

Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
See the recommended documentation of this function

Aide de Scilab >> Entrées/Sorties [fichiers] > Chemins - nom de fichiers > fileparts


returns the path, filename and extension for a file path

Calling Sequence

[path, fname, extension] = fileparts(fullpath)
value = fileparts(fullpath, sel)



a string or a string matrix, the given file path.


a optional character string selector, with possible values: 'path', 'fname' or 'extension'.


a string or a string matrix, the path of the directory pointed to by fullpath.


a string or a string matrix, the filename part is any or ''.


a string or a string matrix, the extension part is any or ''.


a string or a string matrix, depending on sel value.


[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.


[path,fname,extension]=fileparts(['SCI/etc/scilab.start', 'SCI/etc/scilab.start'])
fileparts(['SCI/etc/scilab.start', 'SCI/etc/scilab.start'],'extension')

See Also

  • pathconvert — converts a path to an OS path format.
  • basename — strip directory and suffix from filenames
  • fullfile — Construit un nom de fichier complet
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 13:54:34 CEST 2014