import shutil
import os
import time

def download_folder(folder_path):
    # Create a unique filename based on the current timestamp
    timestamp = str(int(time.time()))
    zip_filename = f"/content/download_{timestamp}.zip"

    # Create a zip file of the folder
    shutil.make_archive(zip_filename, 'zip', folder_path)

    # Provide download link for the zip file
    print("Download Link: ")
    print(f'<a href="{zip_filename}" download>Click here to download</a>')

# Provide the folder path you want to download
folder_path = '/content/ComfyUI/output'

# Call the function to download the folder
download_folder(folder_path)