# MX\_SRCHPATH
> [HTML Version](mx_srchpath.htm)
_Added June 2018_
**xcall MIAMEX, MX\_SRCHPATH, file, foundpath**
MX\_SRCHPATH (MIAMEX 191) searchs for a file in the system path.
**Parameters**
_file_ ([String](string.htm.md)) \[in\]
filename to search for. Wilcards and directory names disallowed.
_foundpath_ ([String](string.htm.md)) \[out\]
returns "" if not found, else the full path.
**Comments**
The search path is system dependent, but normally includes the current directory, the directory from which the A-Shell executable was loaded, plus all the directories included in the PATH environment variable.
One use of this function would be to check whether a particular external command exists before attempting to launch it via HOSTEX[xs](keyword-types.htm.md).
**History**
2018 June, A-Shell 6.5.1638: Function added to A-Shell.