mfilename
Name of the currently running file.
📝Syntax
name = mfilename()
name = mfilename('fullpath')
name = mfilename('fullpathext')
📥Input Arguments
Parameter Description
option optional string: 'fullpath' returns the path without extension, and 'fullpathext' includes the extension.
📤Output Arguments
Parameter Description
name string with the current script or function name. The result is empty when no file is executing.
📄Description

mfilename returns the name of the currently running function or script.

With an option, it can return a path-qualified form supported by Nelson.

💡Examples
Query the current file name. In the command window, the result is empty.
name = mfilename()
nameWithPath = mfilename('fullpath')
🔗See Also
nfilenamerun
Used Functions
nfilename
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub