I want to know a code to backup (copy) a file periodically,
daily, weekly, and monthly plus every I close the program
maybe with a little encryption
I've made one with encryption but when I copy any big file i got some error
(i forget it) and it's not periodicaly
if i only backup a txt file it's work
ps: sorry for my horrible english, I'm suck on it :P
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video) My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet Social Group:VBForums - Developers from India
i'm messed up my code very much,
& it's my last "save" backup
though it's horrible to see
it's on form2
still using button to backup (not periodically)
using caesar criple + str(whatever I forgot how to spell it) to encrypt
maybe someone could help me to fix it up
Create one backup function (in a module). Then, based on the settings a user chose, call it in the Form_Unload event (application closing), or if it is periodical, create a Timer that will run once a minute (Interval 60.000) and check the current date/time (Now) against the date/time of the last backup. Then, depending on the DateDiff between the two and the period the user chose (every hour, daily, weekly etc) call the backup function.