The function FILESPEC called with the parameter D (for Drive)
returns all chars up to the first colon in the filename.
Example:
/* */ say filespec( "D", "__D__:\test" ) /* -> returns: */ /* "__D__:" */ say filespec( "D", " D:\test" ) /* -> returns: */ /* " D:" */
In general, the function FILESPEC only checks the syntax of the parameter string; it does not check if the parameter is a valid file or directory name. (see also Expand the function FILESPEC)