Backups - needed!

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Backups - needed!

Post by DoubleDutch »

Freak: If (before a save) the editor did something like this:

Code: Select all

DeleteFile(filename$+".bk9")
RenameFile(filename$+".bk8",filename$+".bk9")
RenameFile(filename$+".bk7",filename$+".bk8")
RenameFile(filename$+".bk6",filename$+".bk7")
RenameFile(filename$+".bk5",filename$+".bk6")
RenameFile(filename$+".bk4",filename$+".bk5")
RenameFile(filename$+".bk3",filename$+".bk4")
RenameFile(filename$+".bk2",filename$+".bk3")
RenameFile(filename$+".bk1",filename$+".bk2")
RenameFile(filename$+".bk0",filename$+".bk1")
RenameFile(filename$,filename$+".bk0")
; now save actual file here...
Then if this:
http://www.purebasic.fr/english/viewtop ... 519#236519

happened again I could just rename the .bk0 file!!!

This method shouldn't slow down saving than much (as no extra data is saved - just files are renamed).

Also, if I needed to go "back in time" then I could go back upto 10 compiles easily.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system