Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Backup files
#1
Hi.
I want to give my little creation. xD (not possible without the help of Gintaras).

I was using for some time a comercial aplication, Caddais BackupOnDemand because it was small. But for a strange reason, my system crashes and all files was away (a problem with the SATA controller from windows, I think).
Now, I have bought a SATA dock (internal), for my backups, and I wanted something special/personal for my needs. That's why I made this macro and why it calls SATABackup Smile

Well, this macro is for backup files from one folder to another, and maintain versions of the files modified.
There are two macros and the rest are functions for them.
The macro SB_CreateConfigFile creates the INI file needed to configure source and destination. There is a "?" button with a lot of info, maybe too much.
The other macro, SB_Backup is the one which makes the backup. It can be automated with the Scheduled tasks or a shortcut (Read the comments at the beginning of the macro).

I write an example on how it works.
Code:
Copy      Help
Source:
File1.doc, File2.jpg, File3
Backup:
-null-
We run the macro:
Code:
Copy      Help
Source:
File1.doc, File2.jpg, File3
Backup:
File1.doc, File2.jpg, File3
Now, we modify File1,File3 and adds File4 and then, run the macro:
Code:
Copy      Help
Source:
File1.doc, File2.jpg, File3, File4.txt
Backup:
File1.doc, File1.v01.doc, File2.jpg, File3, File3.v01, File4.txt
Note that, as vXX is greater, is an older version.
For the file changes detection compares the filename, last modify date and size. I tried to do a real MD5 on each file to compare, but it was to slow...... (1GB/min)

These code can be used as provided, but can be modified, deleted and whatever you want. xD
But I think you can't do too much with this code... I'm not a good programmer (Well, I program as well as I speak English ) :oops:

Note: There is a LB_Add too, that is needed if you run a version older than 2.3. Don't import if you have the new version!


EDIT: I forget to say that this macro messes with files, and can contain bugs. Be careful!!!! I'm not responsible if something is wrong......


Attached Files
.qml   SATABackup.qml (Size: 29.91 KB / Downloads: 630)


Forum Jump:


Users browsing this thread: 1 Guest(s)