# MX\_MKPATH, MX\_RMPATH
> [HTML Version](mx_mk_rm_path.htm)
_Revised and revised April 2024_
**xcall MIAMEX, MX\_MKPATH, dirspec, status**
**xcall MIAMEX, MX\_RMPATH, dirspec, status**
MX\_MKPATH (MIAMEX 38) creates a new native operating system directory. MX\_RMPATH (MIAMEX 39) deletes the specified native directory.
**Parameters**
_dirspec_ ([String)](string.htm.md) \[in\]
the directory name. This should be in native file format, but may include embedded environment variables (e.g. %miame%\\newdir).
_status_ ([Integer](integer.htm.md)) out
will return 0 for success, else an error number. You may use MX\_ERRNOMSG to translate the error number to a text message.
**Comments**
[MX\_MKDIR](mx_mkdir.htm.md) will be invoked automatically if this function is requested under Windows. Therefore, it may be best to always use MX\_MKPATH in your application and let A-Shell decide when to convert it to MX\_MKDIR. The exception would be if your application which is running on a server (with ATE clients) wants to explicitly create a directory on the ATE client. In this case, you must use MX\_MKDIR and set the remoteflag parameter to "R."
Note that this function supports embedded environment variables, e.g.:
xcall MIAMEX,MX\_MKPATH,"%MIAME%\\901902",STATUS
In general this function will not succeed if the parent directory doesn't already exist.
**See Also**
• [AG\_MKDIR](ag_mkdir.htm.md)