yes, \ is delimiter.
and right(,2) is just for checking if there is files for that day. could have simply used len()

don't use right or anything, you get the filenames if you split with the delimiter like shown in my example.

I also see you removed all the matching characters from the dir:
$file=Dir("c:\admin1\*.*.*.*."+$year+Right("0"+$month,2)+Right("0"+$day,2)+".*.*")

even though, it now requires to have enough dots in the name, but at least leaving the constant values, if there are any should be considered.
if there is none, then it's fine as it is.
_________________________
!

download KiXnet