anchor.diff:  %UPVAR% %RETVAR%
   set "%RETVAR%=%NAME%"
   %RETURN%
  +
  +:#----------------------------------------------------------------------------#
  +
  +:dirname PATHNAME DIRVAR	:# Returns the directory part of the pathname
  +setlocal EnableExtensions EnableDelayedExpansion
  +set "DIR=%~1"
  +:dirname.next
  +if "!DIR:~-1!"=="\" goto :dirname.done
  +if "!DIR:~-1!"==":" goto :dirname.done
  +set "DIR=!DIR:~0,-1!"
  +if defined DIR goto :dirname.next
  +:dirname.done
  +endlocal & set "%~2=%DIR%" & exit /b
  +
  +:#----------------------------------------------------------------------------#
  +
  +:filename PATHNAME FILEVAR	:# Returns the file name part of the pathname
  +setlocal EnableExtensions EnableDelayedExpansion
  +set "PATHNAME=%~1"
  +set "NAME="
  +:filename.next
  +set "C=!PATHNAME:~-1!"
  +if "!C!"=="\" goto :filename.done
  +if "!C!"==":" goto :filename.done
  +set "NAME=!C!!NAME!"
  +set "PATHNAME=!PATHNAME:~0,-1!"
  +if defined PATHNAME goto :filename.next
  +:filename.done
  +endlocal & set "%~2=%NAME%" & exit /b
  +
  +:#----------------------------------------------------------------------------#
  +
  +:has_wildcards NAME	:# Return ERRORLEVEL 0 if a name contains wildcards
  +setlocal EnableExtensions EnableDelayedExpansion
  +set "NAME=%~1"
  +set "RESULT=0"
  +:has_wildcards.next
  +set "C=!NAME:~-1!"
  +if "!C!"=="*" goto :has_wildcards.done
  +if "!C!"=="?" goto :has_wildcards.done
  +set "NAME=!NAME:~0,-1!"
  +if defined NAME goto :has_wildcards.next
  +set "RESULT=1"
  +:has_wildcards.done
  +endlocal & exit /b %RESULT%
   
   :#----------------------------------------------------------------------------#
   :#                                                                            #
  
positive.code: goto :eof
  
  :#----------------------------------------------------------------------------#
  :#                                                                            #
  :#  Function        Main                                                      #
  :#                                                                            #
  
negative.code: :#  History                                                                   #
  :#   2013-08-27 JFL Created this routine.                                     #
  :#   2015-11-19 JFL Adapted to new %UPVAR% mechanism.                         #
  :#   2017-10-23 JFL Simpler and faster versions of is_dir.                    #
  :#                                                                            #
  :#----------------------------------------------------------------------------#
  
  :get_attrs PATHNAME RETVAR -- Returns string drahscotl-- (Directory/Read Only/Archived/Hidden/System/Compressed/Offline/Temporary/Link)
  set "%~2="
  for /f "delims=" %%a in ("%~a1") do set "%~2=%%~a"
  exit /b
  
  :is_dir pathname       -- Check if a pathname refers to an existing directory
  for /f "tokens=1,2 delims=d" %%a in ("-%~a1") do if not "%%~b"=="" exit /b 0
  exit /b 1
  
  :is_dir2 pathname       -- Check if a pathname refers to an existing directory
  pushd "%~1" 2>NUL && popd
  exit /b
  
  :is_dir1 pathname       -- Check if a pathname refers to an existing directory
  %FUNCTION%
  pushd "%~1" 2>NUL
  if errorlevel 1 (
  