Step-by-step guide to creating a simple backup script in Windows »
Protect your data every day in a simple way
You're working for hours on an important document, taking a photo, or creating something that took you days. And suddenly... your computer freezes or the file gets lost. It's not a nightmare – it happens!
The good news? You can create your own backup system that runs automatically every day, without having to be a computer expert or write commands. All you need is a simple file that runs with a double-click!
What you will need to get started
Before we start, let's see what you need:
- A Windows computer
- The folder you want to protect (e.g. "My Documents", "Photos", etc.)
- Place where the copies will be stored (e.g. external drive or another folder on your computer)
- 5-10 minutes of your time
Step 1: Create the backup file
BackupScript.bat and select "All files".bat your assistant that will do all the work for you. With a double click, it creates a new folder with a date and copies your files automatically!
Step 2: Write the Backup Script
Now we will create the commands that will perform the backup. Copy the following code:
- source: Enter the path of the folder you want to backup here.
- destination: Enter the folder where you want the copies to be saved here.
How to find the path of a folder?
Easy! Open the folder you want, click on the address bar (top right) and the full path will appear. Copy it and paste it into the script.
Example: If your documents are located in "C:\Users\Admin\Downloads", then source=C:\Users\Admin\Downloads
Example for destination: If you want the copies to be saved on an external drive in the Backup folder, then destination=I:\Backup
Step 3: Save the Script
BackupScript.bat.bat — so you can run it with a double click!
Step 4: Running the Script
Now you're ready to try it:
BackupScript.batBackup_2025-10-08_10-09
Step 5: Set Execution Time (Task Scheduler)
If you want the backup to be done automatically every day, every week, etc., you can schedule it with Task Scheduler (Task Scheduling).
How to open Task Scheduler in Windows 11
taskschd.mscCreating a daily task
Καθημερινό Backup and foot Next (Next)23:00 every night) and press NextBackupScript.batC:\Scripts\BackupScript.batWATCH THIS
FAQ
What happens if my computer is turned off during the backup?
You can set it. Task Scheduler (Task Scheduler) to run the backup the next time you turn on the computer. Just right-click on the task, go to settings and check "Run task as soon as possible after a scheduled start is missed" (Perform the task as soon as possible if the scheduled time was missed).
How much space do I need?
It depends on your files and how many backups (copies) you want to keep. If you keep 7 backups and your files are 10GB, you need about 70GB. That's why we recommend an external drive!
It is safe;
Yes! The script simply copies files – it does not delete or modify the originals. Your original files remain intact.
Can I backup multiple folders?
Of course! Just repeat the commands. Copy-Item (Copy item) for each folder you want to protect or create separate scripts (command files).
Why It's Worth Doing
- Calm: You know your files are safe
- Automation: You don't have to remember to do it manually.
- Free: No service subscriptions cloud (cloud computing)
- Control: Your data remains in your hands.
- Flexibility: You can customize it as you wish.
- Learning: You better understand how your computer works
Conclusion
Creating a system backup (backup) isn't as hard as it seems! With a few simple steps, you can protect your valuable data and sleep soundly every night. Most importantly? When something goes wrong (and it will), you'll be ready. Instead of losing years of memories or hours of work, it only takes a few clicks to recover them.
Loading comments...