What You'll Learn
How to use AI to write simple automation scripts that handle repetitive computer tasks — even if you have never written a line of code before. Describe the task, get the script, run it, and reclaim your time.
Why This Matters
Many time-consuming tasks are just computers doing the same thing over and over: renaming hundreds of files, formatting a spreadsheet every Monday, copying data from one place to another. A small script can do this in seconds. Previously, you needed to know how to code to do this. Now, you just need to describe what you want.
Step-by-Step Guide
Step 1: Describe the task clearly
The clearer your description, the better the script. Include:
- What the task involves (what files, what data, what action)
- Where things are (file paths, app names)
- What the output should look like
I want to automate the following task:
[describe the task in plain English]
Here are the details:
- I'm using a Mac / Windows PC
- The files/data are located at: [describe location]
- The desired output is: [describe what the end result should look like]
Please write a simple script I can run to do this. Use Python if possible and explain each step in comments so I understand what it does.
Step 2: Run the script safely
Always test automation scripts on a small sample first — never on all your files at once. Ask AI to help you test it:
Before I run this on all my files, how can I test it on just one or two files first to make sure it works correctly?
Step 3: Handle errors
If the script throws an error, paste it back into AI:
When I run this script, I get the following error:
[paste error message]
How do I fix it?
Step 4: Extend the script
Once the basic version works, ask AI to add features:
The script works well. Can you modify it to also:
- [additional requirement]
- Skip files that have already been processed
- Log what it did to a text file
Example Use Cases
- Rename files in bulk: "Rename all photos in this folder by adding the date they were taken to the filename."
- Format spreadsheets automatically: "Every Monday morning, take the data from Sheet 1 and format it into the report template in Sheet 2."
- Organise downloads: "Move files in my Downloads folder into subfolders by file type (PDFs, images, documents, etc.)."
- Send automated emails: "Send a reminder email to a list of contacts every Friday afternoon."
Tips for Better Results
- Always test on a copy first. Before running any script on important files, make a backup or test on a small, safe copy.
- Ask for Python. Python is the most readable automation language and the best-supported by AI tools. It runs on Mac and Windows with minimal setup.
- Ask AI to explain the script. Even if you do not plan to learn coding deeply, understanding what the script does helps you know what to change when your needs evolve.
Tools That Work Best for This
- Claude or ChatGPT — both excellent at writing automation scripts from plain-English descriptions. Claude tends to produce better-commented, more readable code.
- Claude Code — if you need a script to interact with your project files or run inside a development environment, Claude Code has direct access to your filesystem and can iterate much faster.
