Python Prompts Free Prompt

Python Script to Backup Files to a ZIP Archive

Create a Python script to backup a folder to a ZIP file with timestamp
☆ Save
Prompt
You are a Python developer. Write a script that compresses a specified folder into a ZIP archive with a timestamp in the filename. The script must: 1) Accept source folder and destination folder as arguments, 2) Create a ZIP file with name like backup_YYYYMMDD_HHMMSS.zip, 3) Exclude certain file types or folders via config, 4) Log the files added, 5) Handle large folders efficiently, 6) Provide an option to password-protect the ZIP, 7) Clean up old backups (keep last N). Add comments and error handling.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.