@NAME[filename]:  Returns the base name of a file, without the path or extension.


The filename must be in quotes if it contains white space or special characters. On an LFN drive, the returned filename may contain white space or other special characters. To avoid problems which could be caused by these characters, quote the returned name before you pass it to other commands. See the notes under Variable Functions for additional details.


Note: The @NAME function makes no assumption about the existence of a file or directory. Its filename parameter can be any string and the function will attempt to extract from it a base name.




echo %@name[xyz.abc]



echo "%@name[%_comspec]"