#!/bin/bash

for month in 1 2 3 4 5; do
  month_str=$(printf "%02d" $month)
  dir_name="2024${month_str}01"
  zip_name="2024${month_str}X.zip"

  if [ -d "$dir_name" ]; then
    zip -r "$zip_name" "$dir_name"
    if [ $? -eq 0 ]; then
      rm -rf "$dir_name"
      echo "Successfully zipped and removed: $dir_name"
    else
      echo "Failed to zip: $dir_name"
    fi
  else
    echo "Directory not found: $dir_name"
  fi
done
