When checking whether a directory exists, this works
if exist "M:\folder\" echo ok
But this does not
set thedir = "M:\folder"
if exist %thedir% echo ok
Ultimately, I am checking to see if a folder has been created with the current date
set CUR_YYYY=