[Scilab-users] find name / path of open file
Jan Åge Langeland
j-lan at online.no
Fri Dec 27 20:34:24 CET 2019
Federico
Yes, I thought that would be easier. But still not as good as it could
be, as it is difficult to use these function calls directly in
expressions. This is the way I think it should be done in Scilab 6:
function fp=fparts(fid)
[a,b,fpne,d,e]=file(fid);
[pathname,filename,extname]=fileparts(fpne);
fp=list(fpne,pathname,filename,extname);
endfunction
fparts(fid)(1)// full path/filename.ext
fparts(fid)(2)// path
fparts(fid)(3)// filename
fparts(fid)(4)// extension
Jan
On 2019-12-27 17:00 PM, Federico Miyara wrote:
>
> Jan,
>
> Oh, thanks! That's much better than dispfiles, since it gives the name
> as a variable. I had seen that function but somehow I didn't realize
> that possibility.
>
> Regards,
>
> Federico Miyara
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20191227/ec1e900d/attachment.htm>
More information about the users
mailing list