basename - Windows command-line utility to return file-name portion of path name
basename string [suffix]
The basename Windows command-line utility treats the string argument as a path name. The string is converted to the file name corresponding to the last path-name component in string, and then the suffix string, if present, is removed. The basename command does this by performing actions equivalent to the following steps, in order:
/
) or backslash (\
) characters,
string is set to the last character in string, and
the remaining steps are skipped.The resulting string is written to standard output.
The basename(1w) command exits 0 on success, and >0 if an error occurs.