Skip to content

Instantly share code, notes, and snippets.

@dclamage
Created August 12, 2024 03:34
Show Gist options
  • Save dclamage/108c7c75f593b9e5a5026c36155c15f6 to your computer and use it in GitHub Desktop.
Save dclamage/108c7c75f593b9e5a5026c36155c15f6 to your computer and use it in GitHub Desktop.
Create folders script
import os
import datetime
def create_folders():
# Get current date and time
now = datetime.datetime.now()
# Use current date if it's before noon, otherwise use tomorrow's date
date_to_use = now.date() if now.hour < 12 else now.date() + datetime.timedelta(days=1)
# Folder names to create
folder_names = [
"Adoptle",
"Daily Games",
"NYT Connections",
"NYT Games",
"NYT Medium",
"NYT Hard",
"NYT Mini",
"NYT Strands",
"Wordle",
]
# Create each folder
for folder_name in folder_names:
folder_path = f"{date_to_use} {folder_name}"
os.makedirs(folder_path, exist_ok=True)
print(f"Created folder: {folder_path}")
# Run the script
if __name__ == "__main__":
create_folders()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment