<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-2022-JP"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Le 15/11/2011 01:21, Iai Masafumi ax a écrit :
<blockquote cite="mid:4EC1B082.8030207@axelspace.com" type="cite">
<pre wrap="">Hi
Does Scilab have a command like mfilename in Matlab? I want to get the
name of a currently running script file.
</pre>
</blockquote>
If you really don't know the name of the current script, you may use
the following:<br>
<br>
<font face="Courier New, Courier, monospace">[u,t,n]=file(); <br>
i = grep(n',"/(?:.*\.sci|.*\.sce)$/","r");<br>
p = n(i(1))<br>
</font>// and if you need only the script name without its path nor the
file extension:<font face="Courier New, Courier, monospace"><br>
basename(p)</font><tt><br>
</tt><br>
Samuel<br>
<br>
</body>
</html>