gives an absolute pathname of a file opened in Scilab
[filepath, filename] = get_absolute_file_path()
filepath = get_absolute_file_path(filename)
a character string: name of the file.
a character string: an absolute path.
get_absolute_file_path(filename) searches in Scilab's
internal list of currently opened files the file with name
and returns its path
If file is not opened, it will return an error.
Without input arguments and called from a script,
returns the absolute path of the script and optionally its name. When called without input arguments
from the command line
get_absolute_file_path() returns an error.
In previous version (Scilab 5.0.x) current directory was returned if file was not found.
mputl(['[filepath,filename]=get_absolute_file_path()' 'disp(filepath,filename)'],TMPDIR+'/script.sce'); exec(TMPDIR+'/script.sce',-1)
- dispfiles — displays properties of opened files
- file() — file management
- getshortpathname — gets short path name
- getlongpathname — gets long path name
- pwd — gets Scilab current directory
|Report an issue|
|<< fullpath||Paths - Filenames||getdrives >>|