description | title | ms.date | helpviewer_keywords | monikerRange | ||
---|---|---|---|---|---|---|
Learn more about: basename NMAKE function |
basename NMAKE function |
9/30/2021 |
|
>=msvc-170 |
Gets the base name for each item in a list.
$(basename input)
input
The list of file paths to convert.
A list with each of the items from input
converted to their base name (that is, with their extensions removed).
basename
doesn't have any maximum path limitations.
The basename
function is equivalent to using the R
modifier in a filename macro.
This macro function is available starting in Visual Studio 2022 version 17.1, in NMAKE version 14.31 or later.
$(basename c:\temp\file.txt) # Evaluates to "c:\temp\file"
$(basename c:\temp\ c:\file) # Evaluates to "c:\temp\ c:\file" - Directories and files without extensions are left as-is
$(basename c:\src\.gitignore) # Evaluates to "c:\src\" - Dot files are considered to be extensions and so are removed