anchor.diff:  
   :#----------------------------------------------------------------------------#
   
  +:# Simpler version not supporting wild-cards, but that works with any absolute or relative pathname
  +
  +:# Returns the directory part of the pathname, so that %DIRVAR%\NAME refers to that file
  +:basename PATHNAME DIRVAR
  +setlocal EnableExtensions EnableDelayedExpansion
  +set "DIR=%~1"
  +:dirname.next
  +if "!DIR:~-1!"=="\" set "DIR=!DIR:~0,-1!" & goto :dirname.done
  +if "!DIR:~-1!"==":" set "DIR=!DIR!." & goto :dirname.done
  +set "DIR=!DIR:~0,-1!"
  +if defined DIR goto :dirname.next
  +set "DIR=."			&:# If empty, return the current directory
  +:dirname.done
  +endlocal & set "%~2=%DIR%" & exit /b
  +
  +:#----------------------------------------------------------------------------#
  +
   :dirname PATHNAME DIRVAR	:# Returns the directory part of the pathname
   setlocal EnableExtensions EnableDelayedExpansion
   set "DIR=%~1"
  
positive.code: :# This can easily be adapted to other languages: French=(jj-mm-aa) German=(TT-MM-JJ) Spanish=(dd-mm-aa) Japanese ([]-[]-[])
  :# But Chinese outputs a string without dashes: ([][][]) so this would be more difficult.
  :now
  setlocal enableextensions enabledelayedexpansion
  set "D="
  for /f "tokens=2 delims=:" %%a in ('echo.^|date') do (
    if "!D!"=="" ( set "D=%%a" ) else ( set "O=%%a" )
  
negative.code: 
  :#----------------------------------------------------------------------------#
  
  :# Get the current date/time
  :# Implementation based on wmic. Not available in early XP versions?
  :# Just as fast as the pure batch version using reg for internationalization.
  
  :Now.wmic
  setlocal EnableExtensions
  for /f %%i in ('WMIC OS GET LocalDateTime /value') do for /f "tokens=2 delims==" %%j in ("%%i") do set "dt=%%j"
  endlocal & set "YEAR=%dt:~,4%" & set "MONTH=%dt:~4,2%" & set "DAY=%dt:~6,2%" & set "HOUR=%dt:~8,2%" & set "MINUTE=%dt:~10,2%" & set "SECOND=%dt:~12,2%" & set "MS=%dt:~15,3%"
  exit /b
  
  :#----------------------------------------------------------------------------#
  
  :GetWeekDay
  setlocal EnableExtensions EnableDelayedExpansion
  for %%i in ("0=Sun" "1=Mon" "2=Tue" "3=Wed" "4=Thu" "5=Fri" "6=Sat") do set "wd%%~i"
  :# The first for trims spaces around the answer; The second for extracts the value after the = sign.
  for /f %%i in ('WMIC PATH Win32_LocalTime GET DayOfWeek /value') do for /f "tokens=2 delims==" %%j in ("%%i") do (
    set "WEEKDAY=%%j"
    set "WEEKDAYNAME=!wd%%j!"
  )
  endlocal & set "WEEKDAY=%WEEKDAY%" & set "WEEKDAYNAME=%WEEKDAYNAME%"
  exit /b
  
  :#----------------------------------------------------------------------------#
  :#                                                                            #
  