Automatically backup files on an external hard drive on insertion.
-
Installation.
- Download the compressed file.
- Extract it to the desired directory.
-
Creating a backup list.
- Open
BackupList.txt
. - Enter each file/directory you want to back up in a new line.
For example:
C:\Users\MyUser\Documents\Passwords.kdbx C:\Users\MyUser\Documents\Recipes\Krabby Patty.doc C:\Cat Photos\
- Open
-
Creating a devices list.
- Open
VolumeList.txt
. - Connect your external devices.
- Open the terminal and run the command
vol X:
where X is your external device.
For example:
C:\>vol E: Volume in drive E is SSD ExternalHD Volume Serial Number is 201A-5BA1
- Copy each serial number in a new line. Make sure you remove the hyphen and add a "0x" prefix.
- After each serial number add a semicolon and add the path to the directory on the device (
SN;PATH
).
For example:
0x404329D6;X:\Backup 0xad12cb34;X:\Important 1078143446;X:\Tools\KeePassXC
- Open
-
Creating a scheduled task.
- Open the task scheduler (Click ⊞ Win+R, then type taskschd.msc and press enter).
- Optional: Create a new folder named
My Tasks
. - Create a basic task by clicking
right mouse key > Create Basic Task...
or clicking in the menuAction > Create Basic Task...
- Enter a name and a description and click
Next
. - Set the trigger to
When I log on
. - Select
Start A Program
in Action and click next. - In the
Program/Script:
field browse and chooseAutoBackup.exe
file.
In theStart in
field choose the directory that holds the program's files (Important). - Optional: In the
Add arguments
field you can add the valuenocopy
if you don't want to create another copy (see notes).
- Enter a name and a description and click
Notes
- The files
VolumeList.txt
andBackupList.txt
are read once on program startup. - The program will start the backup process when the device is inserted.
- If the backup directory specified doesn't exists on the external device the program will not create it, and the backup process will stop.
- If the backup file already exists on your external device, then the program will copy it to the same directory with the prefix "original_", and overwrite the backup file with a new copy of the system's backup file.
This is done in order to prevent overwriting the backup file with a corrupted file.
If you don't want to create another copy (recommended for large files/directories)add the argumentnocopy
in the task properties (Action tag). - The program will overwrite the backup file only if it's older than the file on the system.
- You can add the serial number as an integer (without
0x
prefix)