for dir in ????/??; do
year=${dir:0:4}
month=${dir:5}
days=$(cal "$month" "$year" | awk 'NF {DAYS = $NF}; END {print DAYS}')
for date in seq 1 "$days"; do
filename="file_name_${year}${month}${date}.csv"
if [[ ! -f /"$year"/"$month"/"$filename" ]]; then
echo "$filename is missing."
fi
done
done