<div dir="ltr">Thanks Jan A<div><br></div><div>The following script return what I want to get</div><div><br></div><div>******************************</div><div><div>[units,typs,nams]=file();</div><div>a=nams(max(grep(nams,'getting')));</div><div>b=strsplit(a, [filesep();'.']);</div><div>disp(b($-1));</div></div><div>******************************</div><div><br></div><div>Best regrds</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-17 0:46 GMT+09:00 Jan Åge Langeland <span dir="ltr"><<a href="mailto:j-lan@online.no" target="_blank">j-lan@online.no</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 16.03.2016 15:59, fujimoto2005 wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,all<br>
<br>
I executed the script with the execute command of the scinote so it failed.<br>
I want to use the execute command of the scinote.<br>
<br>
I tried<br>
[units,typs,nams]=file().<br>
<br>
But nams are as follows<br>
<br>
stderr<br>
!<br>
!<br>
!<br>
!C:\***\gettingScriptName02.sce !<br>
!<br>
!<br>
!stdin<br>
!<br>
!<br>
!<br>
!stdout<br>
!<br>
<br>
</blockquote></span>
file() is clearly better than my suggestion.<br>
nams is different in Scilab 5 and Scilab 6 and maybe vary with OS also, but since you know a bit about the script name you should be able to find it with grep:<br>
<br>
nams(max(grep(nams,'getting')))<br>
<br>
Jan Å<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>