FILES=( $(remote_from_to_month_prefix) )
if [ -n "$FILES" ] ; then
- THATMONTH="${FILES[0]:6:6}" # to-month of newest
+ THATMONTH="${FILES[0]:0:6}" # to-month of newest
if [ "$THISMONTH" != "$THATMONTH" ] ; then
echo "** New monthly snapshot; stashing daily into .$THATMONTH" >&2
{ # Generate command stream for sftp